index: do not throw an Error when given a falsey DOM node, and a root element

This will fix: https://github.com/Automattic/html-pipe/issues/4
Merge pull request #4 from MatthewMueller/fix/do-not-throw-on-falsey-dom-node

index: do not throw an Error when given a falsey DOM node, and a root element