makes sure that only elements are checked for classList property