Would this be better as classList.contains instead?