Revert "return nil instead of null object"

This reverts commit a08f54f33ec6cbebb1192be46e579331bb11da56.
Revert "Revert "Allow null objects to be dumped to YAML by ""

This reverts commit 9496456615f3d0e783f10ddfce9684d3e5703c4b.