code: public static int compare(String left, String right) {
          if (left == null) {
              if (right == null) {
                  return 0;
              } else {
                  return 1; // nulls last
              }
          } else if (right == null) {
              return -1; // nulls last
          }
          return left.compareTo(right);
      }
docs: 0 if equals