Throwing exception when model value of collection is not a valid class