     }
     
     func clear() {
+        guard let bitmapCache = bitmapCache else { return }
+        
         bitmapCache.reset()
     }
 }

    override init() {
        super.init()
        
        let imageFormat = FICImageFormat()
        imageFormat.name = ImageCacheEntityType.portrait.rawValue
        imageFormat.family = ImageFormatFrameDevice

    }
    
    func remove(_ url: URL, type: ImageCacheEntityType) {
        guard let bitmapCache = bitmapCache else { return }
        
        let entity = ImageEntity(url: url)
        let format = type.rawValue
        if bitmapCache.imageExists(for: entity, withFormatName: format) {
