diff --git a/repository/src/main/java/org/apache/hadoop/metadata/services/DefaultMetadataService.java b/repository/src/main/java/org/apache/hadoop/metadata/services/DefaultMetadataService.java
index <HASH>..<HASH> 100755
--- a/repository/src/main/java/org/apache/hadoop/metadata/services/DefaultMetadataService.java
+++ b/repository/src/main/java/org/apache/hadoop/metadata/services/DefaultMetadataService.java
@@ -93,6 +93,11 @@ public class DefaultMetadataService implements MetadataService {
 
             TypesDef typesDef = TypesSerialization.fromJson(typeDefinition);
             Map<String, IDataType> typesAdded = typeSystem.defineTypes(typesDef);
+
+            //TODO A more elegant way to detect failures?
+            if (typesAdded.size() == 0)
+                throw new MetadataException("Invalid type definition");
+
             //TODO how do we handle transaction - store failure??
             typeStore.store(typeSystem, ImmutableList.copyOf(typesAdded.keySet()));
ISSUE <I> - throw exception if type created with invalid JSON