title: Swift 3 found nil when Firebase DB persistence is enabled
body: <p>In my app I am using Firebase db to store my data, I have everything working as it should, with my tableview populating with the data from the db.  However I have found that on initial start it is quite slow to download the data, so I enable persistence in AppDelegate.  When I did this and ran the app it crashes on load with an unexpectedly found nil error.</p>
  
  <pre><code>FIRDatabase.database().persistenceEnabled = true
  </code></pre>
  
  <p>is the line I added to AppDelegate under didFinishLaunching section.</p>
  
  <p>The error occurs in this class on the line I have marked</p>
  
  <pre><code>import Foundation
  import FirebaseDatabase
  import CoreLocation
  
  struct newTracks {
  
  //Declerations
  var locationManager = CLLocationManager()
  let name: String!
  let lat: Double!
  let lon: Double!
  let countryImage: String!
  let link: String!
  let ref: FIRDatabaseReference?
  let distance: Double
  
  
  //Initialize
  init(name: String, trackId: Int, postcode: String, trackType: String, trackURL: String, locID: Int, lat: Double, lon: Double, phoneNumber: String, email: String, rating: Double, numrating: Double, totalrating: Double, countryImage: String, link: String, distance: Double) {
      self.name = name
      self.ref = nil
      self.lat = lat
      self.lon = lon
      self.countryImage = countryImage
      self.link = link
      self.distance = distance
   }
  
  //Initialize data from Firebase
  init(snapshot: FIRDataSnapshot) {
  
      let snapshotValue = snapshot.value as! [String: AnyObject]
      name = snapshotValue["name"] as! String
      lat = snapshotValue["lat"]as! Double
      lon = snapshotValue["long"]as! Double
      ref = snapshot.ref
      countryImage = snapshotValue["country"] as! String   &lt;--  Unexpectedly found nil
      link = snapshotValue["link"] as! String
  
      let currentLat = self.locationManager.location!.coordinate.latitude
      let currentLon = self.locationManager.location!.coordinate.longitude
      let myLocation = CLLocation(latitude: currentLat, longitude: currentLon)
      let loc = CLLocation(latitude: lat, longitude: lon)
      let distanceInMiles = round(myLocation.distance(from: loc) / 1609.34)
      distance = distanceInMiles
  
  }
  
  func toAnyObject() -&gt; Any {
      return [
          "name": name,
          "lat": lat,
          "lon": lon,
          "countryImage": countryImage,
          "link": link,
          "distance": distance
      ]
  
   }
  
  }
  </code></pre>
  
  <p>I don't get why this works ok when persistence isn't switched on, but when I enable it it crashes.  Any help is much appreciated.</p>