Better dealing with NULL json object