Added object type validation to the data client.

Currently this breaks setting all primitive properties on the model.