Add check for root variable in Trie