diff --git a/fda-units-service/validate.py b/fda-units-service/validate.py
index 8ed6cabe853d0fed4054b5816e1459be1e9659c4..e74641dc08c7962aa11a2b6eee590e3d6381787e 100644
--- a/fda-units-service/validate.py
+++ b/fda-units-service/validate.py
@@ -16,7 +16,7 @@ def validator(value):
     #input str
     tmp = str(om)+value
     t_uri = rdflib.term.URIRef(tmp)
-    if next(g.triples((t_uri,None,None)), _exhausted) is _exhausted:
-        return 'invalid unit'
+    if next(g.triples((t_uri,None,om.Unit)), _exhausted) is _exhausted and next(g.triples((t_uri,None,om.PrefixedUnit)),_exhausted) is _exhausted and next(g.triples((t_uri,None,om.UnitDivision)),_exhausted) is _exhausted:
+        return 'invalid'
     else:
-        return 'valid unit'
\ No newline at end of file
+        return 'valid'
\ No newline at end of file