Why is this changed to ?Node, needing an extra node !== null check on every call?
From what I could see this only gets called with a node !== null. Please revisit.