public static Duration duration(final Duration duration) {
        return duration != null
                ? duration
                : Duration.ZERO;
    }
Returns the passed duration if it is non-null else returns a ZERO {@link Duration}
stroom-util/src/main/java/stroom/util/NullSafeExtra.java