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

Adding type constraints and validation for #1224
@AndriySvyryd @ajcvickers