Runtime error in this java program (using trie). Can someone point out the mistake? I tried but couldn't find one.

This code is for this problem.
Link to my code is here.