code: public static long timeInMsOrTimeIfNullUnit(long time, TimeUnit timeUnit) {
          return timeUnit != null ? timeUnit.toMillis(time) : time;
      }
docs: Convert time to milliseconds based on the given time unit.
  If time unit is null, then input time is treated as milliseconds.
  
  @param time The input time
  @param timeUnit The time unit to base the conversion on
  @return The millisecond representation of the time based on the unit, or the time
  itself if the unit is <code>null</code>