title: Get value of Dictionary in Swift 3 which key isn't a String
body: <p>I have a dictionary used NSIndexPath as key. It works fine with Swift 2 but I can't find a solution to make it work with Swift 3. I don't want to use String as a key so please don't suggest it. </p>
  
  <pre><code>// init
  fileprivate var cachedCellSizes: [NSIndexPath: CGSize] = [:] 
  
  // get value 
  if let size = cachedCellSizes[indexPath] {
      return size
  }
  </code></pre>
  
  <p>Compiler error: </p>
  
  <pre><code>Ambiguous reference to member 'subscript'
  </code></pre>
  
  <p>Some solution I had tried but doesn't work: </p>
  
  <pre><code>if let size:CGSize = cachedCellSizes[indexPath] as? CGSize {
      return size
  }
  if let size:CGSize = cachedCellSizes[indexPath] as! CGSize {
      return size
  }
  if let size:CGSize = cachedCellSizes["indexPath"] as CGSize {
      return size
  }
  </code></pre>