Allow number field to receive objects without valueOf

This can happen when the object doesn’t have a prototype.