shortestDuration

fun shortestDuration(firstInSeconds: Long, secondInSeconds: Long?): Duration(source)

Nomen est omen; takes two durations in seconds (with the second one nullable) and returns the shorter on as Duration