 	public func reloadCells(for nodes: [TreeNode], with animation: UITableViewRowAnimation = .fade) {
 		let indexPaths = nodes.flatMap({$0.flatIndex == nil ? nil : IndexPath(row: $0.flatIndex!, section:0)})
 		if (indexPaths.count > 0) {
-			tableView.reloadRows(at: indexPaths, with: animation)
+			tableView?.reloadRows(at: indexPaths, with: animation)
 		}
 	}
 

	
	public func beginUpdates() {
		if UIView.areAnimationsEnabled {
			tableView.beginUpdates()
		}
		updatesCounter += 1
	}
	
	public func endUpdates() {
		if UIView.areAnimationsEnabled {
			tableView.endUpdates()
		}
		updatesCounter -= 1
		if updatesCounter == 0 {
			tableView.reloadData()
			delegate?.treeControllerDidUpdateContent?(self)
		}
	}

	public func cell(for node: TreeNode) -> UITableViewCell? {
		guard let index = node.flatIndex else {return nil}
		let indexPath = IndexPath(row: index, section: 0)
		return tableView?.cellForRow(at: indexPath)
	}
	
	public func node(for cell: UITableViewCell) -> TreeNode? {
		guard let indexPath = tableView?.indexPath(for: cell) else {return nil}
		return flattened[indexPath.row]
	}
	
