Check type of setattr

Validate type of value matches the Reference type specified in the model.