valueOf

Utility function to get DistanceUnits instance from given value.