Replace .children checks with .isElement()

Trivial bit of cleanup suggested in the domdiff cleanup pull request. to @njx