         enumerateAttribute(NSFontAttributeName,
                            in: range,
                            options: [],
-                           using: { (object: AnyObject?, range: NSRange, stop: UnsafeMutablePointer<ObjCBool>) in
+                           using: { (object: Any, range: NSRange, stop: UnsafeMutablePointer<ObjCBool>) in
                             guard let font = object as? UIFont else {
                                 return
                             }

        enumerateAttribute(NSFontAttributeName,
                           in: range,
                           options: [],
                           using: { (object: AnyObject?, range: NSRange, stop: UnsafeMutablePointer<ObjCBool>) in
                            guard let font = object as? UIFont else {
                                return
                            }

                                spansRange = false
                                stop.pointee = true
                            }
        })

        return spansRange
    }
