Element.classList.length should be 0 if there's no 'class' attribute.