Do a comparison of enum constants rather than strings