Fixes to boolean serialization and nullable support