Revert "|#000| refactoring, ignoring non_empty elements of objects, while getting serialized"

This reverts commit 57d1bcb35b66bd61fd524426fda7cbfc7f350437.