 open class NSMutableOrderedSet : NSOrderedSet {
     
     open func insert(_ object: Any, at idx: Int) {
-        guard idx <= count && idx >= 0 else {
-            fatalError("\(self): Index out of bounds")
-        }
+        precondition(idx <= count && idx >= 0, "\(self): Index out of bounds")
 
         let value = __SwiftValue.store(object)
 

    }
    
    open func exchangeObject(at idx1: Int, withObjectAt idx2: Int) {
        guard idx1 < count && idx1 >= 0 && idx2 < count && idx2 >= 0 else {
            fatalError("\(self): Index out of bounds")
        }

        let object1 = self.object(at: idx1)
        let object2 = self.object(at: idx2)
        _orderedStorage[idx1] = __SwiftValue.store(object2)

        }
    }
    
    /// Sets the object at the specified index of the mutable ordered set.
    ///
    /// - Parameters:
    ///   - obj: The object to be set.
    ///   - idx: The index. If the index is equal to `count`, then it appends
    ///   the object. Otherwise it replaces the object at the index with the
    ///   given object.
    open func setObject(_ obj: Any, at idx: Int) {
        if idx == count {
            insert(obj, at: idx)
        } else {
            replaceObject(at: idx, with: obj)
        }
    }
    
