Reimplement Trie.prototype.has