title: Cleaner way to filter nil in Swift array
body: <p>Let's say I have a Swift object called <code>Animal</code>. I have an array of <code>Animal</code> objects, some of which could be <code>nil</code>.</p>
  
  <p>Currently I'm doing this:</p>
  
  <p><code>arrayOfAnimal.filter({$0 != nil}) as! [Animal]</code></p>
  
  <p>This feels rather hacky because of the force unwrapping. Wondering if there's a better way to filter out nils.</p>