code: public static int compareAllowNull(final Comparable c1, final Comparable c2) {
  		if (c1 == null && c2 == null) {
  			return 0;
  		} else if (c1 == null) {
  			return -1;
  		} else if (c2 == null) {
  			return 1;
  		} else {
  			return c1.compareTo(c2);
  		}
  	}
docs: Compares two comparable objects where either may be null. Null is regarded as the smallest value, and 2 nulls are
  considered equal.
  
  @param c1 the first comparable
  @param c2 the second comparable
  
  @return a negative integer, zero, or a positive integer if c1 is less than, equal to, or greater than the c2.