Checking for errors in the parser