private static OptionalDouble toDouble(String value, String sourceDescription) {
        try {
            if (value == null || value.isBlank()) return OptionalDouble.empty();
            return OptionalDouble.of(Double.parseDouble(value));
        }
        catch (NumberFormatException e) {
            throw new IllegalArgumentException("Illegal " + sourceDescription + " '" + value + "': " +
                                               "Must be a number between 0.0 and 1.0");
        }
    }
Returns a string consisting of a number followed by "m", "h" or "d" to a duration given in that unit,
or zero duration if null or blank.
config-model-api/src/main/java/com/yahoo/config/application/api/xml/DeploymentSpecXmlReader.java