Why the change to ?Node ? If following all possible call chain I do not see where a node === null could be passed.
I propose to instead change the signature  DomUtils.removeUnwantedNodes to expect !Node, that should fix this here.
Also CC fails here, because there are lots of node.property calls inside shouldRemove(node) without a check against node !== null.