Returns a Duration object from param duration when it is a number, otherwise return itself
= number to be converted to a Duration or Duration object
= (Default Duration.Unit.MILLISECONDS) Duration unit of number - See
for valid values
Returns a Duration object from param duration when it is a number, otherwise return itself