In valueOf(Object), the object might also be a MetricType in disguise,
in which case is it cast and returned.