title: Swift 4 JSONSerialization.jsonObject
body: <p>I am using Xcode 9.2 and Swift 4. How can I check if the returned json data is null?
  Now it gives me error <code>Type 'Any' has no subscript members</code> at line <code>if json[0]["data"]</code></p>
  
  <pre><code>var json: NSMutableArray = []
  var newsArray: NSMutableArray = []
  
  let url = URLFactory()
  var data = try! NSData(contentsOf: url.getURL()) as Data
  do {
      json = try JSONSerialization.jsonObject(with: data, options: []) as! NSMutableArray
      if json[0]["data"] {
          // data is not null
      }
  } catch let error as NSError {
      // handle error
  }
  </code></pre>
  
  <p>My JSON returns something like this:</p>
  
  <pre><code>{
     "data":
     [
        {
           "news_id":123,
           "title":"title",
           "news_date":"2017-02-08 21:46:06",
           "news_url":"url",
           "short_description":"description",
           "category_id":4,
           "category_name":"Health",
           "latlng":
           [
              {
                 "lat":"43.003429",
                 "lng":"-78.696335"
              }
           ]
        }
        { ....
  }
  </code></pre>