When creating an instance of a built-in type, the ZObjectFactory::createKeyValues checks that all the required key-values are there, builds the child ZObjects, detects whatever errors can be found while doing that, and finally, calls the constructor of that built-in type.
E.g. When creating a ZType, we first create each ZKey instance, and then we pass those to the ZType constructor.
With non-built-ins, we directly call ZObject constructor without checking the child ZObjects. However, ZObject::getZKeyValue method calls ZObjectFactory on the key-values on the getter. This means that if there's an error in the inner data, we will not find it during creation process, but only when we run the getter on a particular key.
Change this so that all construction mechanisms (irrespective to whether it's a builtin or we are using the generic ZObject) build the args and then call the constructor with all the children built.