[Fix] Change hasClass to make it return Boolean