Test for null objects when serialize/deserialize