Fix issue with empty JSON object