added more parameter checks to the json parser