How to test whether any object is available to take

The exception being if there are rules that prevent taking. The way to check for that would be using the Hypothetical Questions extension (or so I assume: I can’t get the example to compile under 6M62). That would allow you to “hypothetically take” something, which would let you determine if that would result in you holding the item in question.