Test and fixes for null json objects