code: private int order(String value1, String value2) {
          int result = -1;
  
          if (value1 == value2) {
              result = 0;
          } else if (value1 != null) {
              if (value2 != null) {
                  result = value1.compareTo(value2);
              } else {
                  result = 1;
              }
          } else {
              result = -1;
          }
  
          return result;
      }
docs: Compares two values (allows null values) to define order
  Returns 0 if they are equals. 1/-1 if bigger/smaller
  
  @param value1 First value to compare
  @param value2 Second value to compare
  @return 0 - if they are equals. 1/-1 if bigger/smaller