Equality check rather than address comparison in setMetricType.