check for parentNode.classList before inspecting it