Correctly handle null in serialized type.