         updateBlock = { _, _ in }
         bundle = Bundle(for: T.self)
         _supplementaryDequeueClosure = { [weak self] view, model, indexPath in
-            guard let self = self else { return nil as Any? as Any }
+            guard let self = self, let model = model as? U else { return nil as Any? as Any }
             if let collectionView = view as? UICollectionView {
                 if !self.supplementaryRegisteredByStoryboard, #available(iOS 14, tvOS 14, *) {
                     #if compiler(>=5.3)

        mapping?(self)
    }
    
    public init(cellConfiguration: @escaping ((T, IndexPath, T.ModelType) -> Void),
                mapping: ((ViewModelMapping<T, T.ModelType>) -> Void)?)
        where T: UICollectionViewCell, T: ModelTransfer, T.ModelType == U
    {

                        
                        if let nibName = self.xibName, UINib.nibExists(withNibName: nibName, inBundle: self.bundle) {
                            registration = .init(cellNib: UINib(nibName: nibName, bundle: self.bundle), handler: { cell, indexPath, model in
                                cellConfiguration(cell, model, indexPath)
                            })
                        } else {
                            registration = .init(handler: { cell, indexPath, model in
                                cellConfiguration(cell, model, indexPath)
                            })
                        }
                        return collectionView.dequeueConfiguredReusableCell(using: registration, for: indexPath, item: model)
                    #else
                        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: self.reuseIdentifier, for: indexPath)
                    if let cell = cell as? T {
                            cellConfiguration(cell, model, indexPath)
                        }
                        return cell
                    #endif
                } else {
                    let cell = collectionView.dequeueReusableCell(withReuseIdentifier: self.reuseIdentifier, for: indexPath)
                    if let cell = cell as? T, let model = model as? T.ModelType {
                        cellConfiguration(cell, model, indexPath)
                    }
                    return cell
                }
