title: NotificationCenter not always calls observer when specified object is a String
body: <p>I have been trying to check why my observer is sometimes called and sometimes isn't when specifying a <code>String</code> <code>object</code> to filter out notifications.</p>
  <p>My original code:</p>
  <pre><code>NotificationCenter.default.addObserver(self, selector: #selector(update), name: .pathContentsChanged, object: self.folder.path) // Where path is something like &quot;/user/folder&quot;
  
  @objc func update()
  {
      // Not always called
  }
  </code></pre>
  <p>My current workaround, which confirms that the notification <code>object</code> does match <code>self.folder.path</code>:</p>
  <pre><code>NotificationCenter.default.addObserver(self, selector: #selector(pathContentsChanged(_:)), name: .pathContentsChanged, object: nil) // No object specified anymore
  
  @objc func pathContentsChanged(_ notification: Notification)
  {
      // This does get called every time
      guard let path = notification.object as? String,
          path == self.folder.path else
      {
          return
      }
      self.update() // notification.object and self.folder.path do match
  }
  </code></pre>
  <p>Is it inherent at how <code>String</code>s work on Swift? Is it because <code>notification.object</code> could be a bridged <code>NSString</code>?</p>