has class function - vanilla JS. Check if element has specified class