Handle dictionaries with non-object values.

In cases where a Dictionary property had a non-object value type, the
dictionary couldn't be treated like an object. This code will wrap a
dictionary so its non-object values are upcast to objects.