ASTHelpers.getSymbol can return null, if the tree it's passed isn't of the right type.  You may need to do that check here.