title: how to check condition with "<null>" in swift 3.0
body: <ol>
  <li>I want to check that the maxprice is equal to "" this or not if it's "" then maxprice will become maxprice = 0</li>
  </ol>
  
  <p><strong>my Json</strong></p>
  
  <pre><code>price = ({
      maxprice = "&lt;null&gt;";
      minprice = "&lt;null&gt;";
  });
  </code></pre>
  
  <p><strong>code</strong></p>
  
  <pre><code>var Arr = NSArray()
  
  Arr = result.value(forKey: "price") as! NSArray
  let max = Arr.value(forKey: "maxprice")
  
  if max == nil {
      self.MaxValue = 0
      self.MinValue = 0
  }
  
  else {
      let maxval =  (Arr.object(at: 0) as AnyObject).value(forKey: "maxprice") as! NSNumber
      let min =  (Arr.object(at: 0) as AnyObject).value(forKey: "minprice") as! NSNumber
  
      self.MaxValue = maxval
      self.MinValue = min
  }
  </code></pre>
  
  <blockquote>
    <p>Error: Could not cast value of type 'NSNull' (0x102148918) to
    'NSNumber' (0x10311c4a8).</p>
  </blockquote>