Lookups for data types, and if logic for entity types

Lookups for data types, and if logic for entity types