Added null object serialization.