check for illegal input on new keyword