Improve and fix data member handling in serialization

Improve and fix null (and empty array) data member handling in serialization
node classes.
Fix some bugs in serialization node classes.