fixed error in getting ontology_type_key for pyesdoc serializations