serializeType takes const ref as arg; NULL pointers are now correctly deserialized