@CheckForNull
private String sanitizeValue(String label, @Nullable String s) {
if (StringUtils.isNotBlank(s)) {
try {
Duration duration = Duration.decode(s, HOURS_IN_DAY);
return duration.encode(HOURS_IN_DAY);
} catch (Exception e) {
throw new IllegalArgumentException(String.format("Invalid %s: %s (%s)", label, s, e.getMessage()), e);
}
}
return null;