Add hasClass method

Adds a shortcut to using `classList.contains`.