convert null to an empty map/set

We already do this for lists, it makes more things work without
downside that I can think of.

On the upside mongoDB can intentionally store nothing at all for the field
when then Set/Map is empty, saving disk space.