Fixed a null pointer exception in the JSON converter