How can I retrieve the "Show documents and other objects" setting from View Properties?

The issue I am currently facing with this setting is that when querying Views via the COM API, I always get back all the documents that match the search conditions of the view. However, the "Show documents and other objects" setting is not included in the search conditions. As a result, the script also returns documents for views that do not have this setting checked in the M-Files client but otherwise match the search condition(s). I am now looking for a way to retrieve that setting programmatically to avoid false positives reported by my script for views that should not display any documents or other objects.