Added null support in JSON writer.