fix: fixes runtime error when developer calls addClass or removeClass on empty element set