title: How to deal with null or blank in Swift?
body: <p>I am fetching data from database. Sometimes it occupies values and sometimes blank. so my app crashes while getting blank. I even used ! and ? to avoid crashing.</p>
  
  <p>In <strong>cellForRowAtIndexPath</strong> method,</p>
  
  <pre><code>cell.profImg!.image = UIImage(named: (profArr.objectAtIndex(indexPath.row).valueForKey("avatar") as? String)!) 
  </code></pre>
  
  <p>App crashes while my profArr contains value</p>
  
  <pre><code>(
  
  {
  
       avatar = ""
  
  }
  
  )
  </code></pre>
  
  <p>Is there any way to avoid crashing without checking variable length.</p>