Add checks and make `childNodes` return NodeList, which is an abstract of `Array<DOMNode` and
overrides `indexOf` to do deep checks.