static <T extends Comparable<T>> int comparePossiblyNull(T aThis, T aThat, NullsGo aNullsGo){
    int EQUAL = 0;
    int BEFORE = -1;
    int AFTER = 1;
    int result = EQUAL;
    
    if(aThis != null && aThat != null){ 
      result = aThis.compareTo(aThat);
    }
    else {
      //at least one reference is null - special handling
      if(aThis == null && aThat == null) {
        //not distinguishable, so treat as equal 
      }
      else if(aThis == null && aThat != null) {
        result = BEFORE;
      }
      else if( aThis != null && aThat == null) {
        result = AFTER;
      }
      if(NullsGo.LAST == aNullsGo){
        result = (-1) * result;
      }
    }
    return result;
  }