Better exception for invalid property casts