index: don't throw an Error when given falsey or non-Element nodes

With tests.
Release 0.1.5