     private var cachedName: String??
     public var name: String? {
         get {
-            switch cachedName {
-            case .none:
-                let value = string(forProperty: kMIDIPropertyName)
+            if let value = cachedName { return value }
+            else {
+                let value: String? = self[kMIDIPropertyName]
                 cachedName = .some(value)
                 return value
-            case .some(let value):
-                return value
             }
         }
         set {
             if cachedName != .some(newValue) {
-                set(string: newValue, forProperty: kMIDIPropertyName)
+                self[kMIDIPropertyName] = newValue
                 cachedName = .none
             }
         }

    // TODO sysExSpeedWorkaroundEndpoint and related

}


        // Immediately fetch the object's uniqueID, since it could become
        // inaccessible later, if the object is removed from CoreMIDI
        cachedUniqueID = self[kMIDIPropertyUniqueID] ?? 0
    }

    private var cachedUniqueID: MIDIUniqueID?
    public var uniqueID: MIDIUniqueID {
        get {
            if let value = cachedUniqueID { return value }
            else {
                let value: MIDIUniqueID = self[kMIDIPropertyUniqueID] ?? 0
                cachedUniqueID = .some(value)
                return value
            }
        }
        set {
            if cachedUniqueID != .some(newValue) {
                self[kMIDIPropertyUniqueID] = newValue
                cachedUniqueID = .none
            }
        }
