Revert "Allow null objects to be dumped to YAML by "

This reverts commit 57cb882002eedc18705dd9025a52633757574676.
return nil instead of null object