code: public static boolean valueChanged(Enum<?> before, Enum<?> after) {
          if (before == null && after == null) {
              return false;
          }
          if (after == null) {
              return false;
          }
          if (before == null && after != null) {
              return true;
          }
          return !(before == after);
      }
docs: Returns true only if the value changed.
  @param before the value before change
  @param after the value after change
  @return true if value changed, else false