Added helper function to recognize string tokens.