         }
         configure(viewController: viewController)
 
-        var viewControllers = tabBarController.viewControllers ?? []
+        var viewControllers = tabBarController?.viewControllers ?? []
         viewControllers.append(destinationNavigationController ?? viewController)
 
-        tabBarController.setViewControllers(viewControllers, animated: animated)
+        tabBarController?.setViewControllers(viewControllers, animated: animated)
     }
 
     func stop() {
         delegate?.willStop(in: self)
-        guard let viewController = viewController, let viewControllers = tabBarController.viewControllers else {
+        guard let viewController = viewController, let viewControllers = tabBarController?.viewControllers else {
             return
         }
 

            mutableViewControllers.remove(at: index)
        }

        tabBarController.setViewControllers(mutableViewControllers, animated: animated)
        delegate?.didStop(in: self)
    }
}


public protocol TabBarItemCoordinator: DefaultCoordinator {
    func configure(viewController: ViewController)
    var tabBarController: UITabBarController? { get }
    var destinationNavigationController: UINavigationController? { get }
}

