Correct error in calling isValidJSON.