refactor to_json None was cast to string