made a check for incorrect json in parser