I to and fro a little over that. In the end, I'm generally only returning null if I would otherwise return a Node or Element. The primary downside to returning null is that the result variable always needs to be set to null at some point, which while not a lot more code, I can't think of any strong advantage returning null provides :).