NPE fix in HuffmanTree