Is there an API for detecting if NSMetadataQuery is unavailable for a given URL (as a search scope)?

If the user prohibits Spotlight in System Settings for a given directory and I set that URL as one of the search scopes on an NSMetadataQuery- I believe the query will return no results.

Is there an API for detecting Spotlight unavailability? Ideally I would like to display something in the UI for this kind of situation to explain why a feature built on top of this API is not working.

Is there an API for detecting if NSMetadataQuery is unavailable for a given URL (as a search scope)?
 
 
Q