title: Prepare(for segue: ) not passing data in Realm
body: <p>The <code>prepare(for segue: )</code> function runs, but the data is not sent to my destination ViewController. I am getting following error when loading that VC's collection view which has to receive the data:</p>
  
  <blockquote>
    <p>Unexpectedly found nil while unwrapping an Optional value</p>
  </blockquote>
  
  <p>I have confirmed that the segue type is a <strong><code>selection</code></strong> segue, the segue identifier is correct, and that the views work as far as displaying dummy data. </p>
  
  <p>First view controller (DrawerVC): </p>
  
  <pre><code>    let realm = try! Realm()
      var allDrawers: Results&lt;Drawer&gt;?
  
      override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
          print("goToTool segue")
          performSegue(withIdentifier: "goToTool", sender: self)
      }
  
      override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
          if segue.identifier == "goToTool" {
              print("Prepare for segue from drawerVC ran")  // this runs!
              let destinationVC = segue.destination as! ToolVC
              if let indexPath = tableView.indexPathForSelectedRow {
                  destinationVC.selectedDrawer = allDrawers?[indexPath.row]
                  print("Selected drawer set to index path")  // doesn't run :(
              }
          } else if segue.identifier == "goToEditCategory" {
              _ = segue.destination as! EditCategoryVC
          }
      }
  
  </code></pre>
  
  <p>Destination view controller (ToolVC): </p>
  
  <pre><code>    let realm = try! Realm()
      var allTools: Results&lt;Tool&gt;?
  
      var selectedDrawer: Drawer? {
          didSet{
              // doesn't run since selectedDrawer was never set :(
              print("The selected drawer changed from \(oldValue) to \(selectedDrawer?.title)")
              loadTools()
          }
      }
  
      func loadTools() {
          allTools = selectedDrawer?.tools.sorted(byKeyPath: "title", ascending: false)
          toolCollectionView.reloadData()  // this is where I get the optional value error
      }
  </code></pre>