trie: don't crash in lookup if node is null