Added a check to test whether or not the incoming phrase already exists in the trie.