Make JSON test only run when JSON object is present