title: It crashes in cellforrowatindexpath of tableview , says : "fatal error: unexpectedly found nil while unwrapping an Optional value"
body: <p>I have two tableview on the same Collectionviewcell. When I run the application, it crashes in cellforrowatindexpath of tableview , says : "fatal error: unexpectedly found nil while unwrapping an Optional value"</p>
  
  <p>Please find below some of my code - </p>
  
  <pre><code>func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; 
  UITableViewCell {
  
  let cell = collectionView.dequeueReusableCell(withReuseIdentifier:     
  reuseIdentifier, for: indexPathOfCollectionView as IndexPath) as!   
  MyCustomCollectionViewCell
  
  if(tableView == cell.graphTableView){
  
  let cell:CustomGraphTableViewCell =   
  tableView.dequeueReusableCell(withIdentifier: "CustomGraphTableViewCell") as!    
  CustomGraphTableViewCell
  
  return cell
      }
      else
      {
          let cell:MyCustomTableViewCell = 
   tableView.dequeueReusableCell(withIdentifier: "MyCustomTableViewCell") as!   
   MyCustomTableViewCell
          cell.nameLabel.text = namesArray[indexPath.row]
          return cell
  
      }
  }
  </code></pre>
  
  <p>Can anyone please suggest the solution. Why is it happening and what can be the solution for the same?</p>