Validates that a duration is positive
static bool isPositiveDuration(Duration? duration) { return duration != null && duration.inMilliseconds > 0; }