Do not use class value of Reference field if it is not a ModelStorage
When Reference fields store partial reference, the value is the stored string instead of an instance. So the class of the value is then str which can not be used for domain validation.
Closes #11954 (closed)