Checking if a symbol is a nonterimnal