code: public static Long getValue(final Long value, final Long defaultValue) {
  
      return value == null ? defaultValue : value;
    }
docs: Returns defaultValue if given value is null; else returns it self.
  
  @param value value to be test.
  @param defaultValue default value to return if given value is null.
  @return defaultValue if given value is null; else returns it self.