validating correctly references to classes, entities and enums