Added constraints and checks to ensure CLR entity types are reference types.