throw exception only if object cannot be made into document
Merge branch 'support_missing_fields_in_to_json' into iekho_master