Added hasClass utility method