             return HKUnit.gramUnitWithMetricPrefix(HKMetricPrefix.Milli)
 
         case HKQuantityTypeIdentifierDistanceWalkingRunning:
-            return isMetric ? HKUnit.meterUnitWithMetricPrefix(HKMetricPrefix.Kilo) : HKUnit.mileUnit()
+            return metric ? HKUnit.meterUnitWithMetricPrefix(HKMetricPrefix.Kilo) : HKUnit.mileUnit()
 
         case HKQuantityTypeIdentifierElectrodermalActivity:
             return HKUnit.siemenUnitWithMetricPrefix(HKMetricPrefix.Micro)

    var numeralValue : Double?       { get }
    var defaultUnit  : HKUnit?       { get }
    var hkType       : HKSampleType? { get }
}

@available(iOS 9.0, *)

    public var defaultUnit: HKUnit? { return sampleType.defaultUnit }

    public var hkType: HKSampleType? { return sampleType }

    public func unitForSystem(metric: Bool) -> HKUnit? {
        return sampleType.unitForSystem(metric: metric)
    }
}

// Readable type description.
