"Initializer for conditional binding must have optional type, not 'string'" but what else in that situation?
<p>"Initializer for conditional binding must have optional type, not 'string'.
I tried <code>sender.stringValue</code> and <code>sender.stringValue?</code> but Xcode things its funny again. (Attribute Error Message above)</p>

<pre><code>        extension MapViewController: NSSearchFieldDelegate {
        override func searchFieldAction(sender: NSSearchField) {
            // Note: use defer to dismiss the search controller even if the guard returns
            defer {
            }

            guard let text = sender.stringValue.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet())
                where !text.isEmpty else { return }

            let request = MKLocalSearchRequest()
            request.naturalLanguageQuery = text
            request.region = mapView.region

            let search = MKLocalSearch(request: request)
            search.startWithCompletionHandler { (response, error) in
                guard let item = response?.mapItems.first else { return }

                let annotation = item.placemark
                self.mapView.addAnnotation(annotation)
                self.mapView.showAnnotations([annotation], animated: true)
                self.mapView.selectAnnotation(annotation, animated: true)
            }
        }
</code></pre>