Changed enum comparisons to use == and !=

Changed enum comparisons to use == and !=