code: public static <T> int compare(T a, T b, Comparator<? super T> c) {
          if (a == b) {
              return 0;
          }
          return c.compare(a, b);
      }
docs: Returns 0 if {@code a == b}, or {@code c.compare(a, b)} otherwise.
  That is, this makes {@code c} null-safe.