test that the element has a nextSibling before testing that node