Added null case for deserialization