trie: do not free data if free_func is NULL