fix returning NULL if json is not found