Check if element has a class

Simiar to jQuery's .hasClass