title: Firebase Add New Key/Value to Pre-existing database without crashing xcode
body: <pre><code>`    let query = ref?.child("Reviews").queryOrdered(byChild: "UserID").queryEqual(toValue: myUser.userId)
          query?.observeSingleEvent(of: .value) { snapshot in
              for child in snapshot.children {
                  let snap = child as! DataSnapshot
                  let dict = snap.value as! [String: Any]
                  let uid = dict["UserID"] as! String
                  let review = dict["Body"] as! String
                  let rating = dict["Rating"] as! String
                  let titleID = dict["TitleID"] as! String
                  let reviewID = dict["ReviewID"] as! String
  
                  let ratingID = dict["RatingID"] as! String
                  `
  </code></pre>
  
  <p>THE ERROR OCCURS AT THE ratingID call to the database. It unwraps nil.</p>
  
  <p>I am trying to adapt a pre existing Firebase database with a new key/value.
  I then try to display entries in my tableview and I get a crash with unwrap returning nil. I know why this is happening and it's because the previous data does not have the new key/value I want to include in the node going forward. I have tried many different things such as if let and guard let without much fortune. How do I add new key/Values and still have the tableview read entries that don't have the new value?</p>
  
  <p>I include an image of the current node and I want to add a 'RatingsID' to the node. When I do, I get the unwrap nil error.</p>
  
  <p>Database node prior to new key/value</p>
  
  <p><a href="https://i.stack.imgur.com/sP2IX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sP2IX.png" alt="enter image description here"></a></p>