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