Add and isMember functions for a Trie