Perform better input checks in early steps of parser.