Add check for null in the json data response