Added handling of null values in JSON.