Right, so to summarize:
op('somepath') #either returns an OP object, or None.
If you currently have an OP object, OP.valid will return whether its still there or not.
So, easiest method to first test if something exists or not is:
if op('somepath'):
op('somepath').someaction...
As Keith mentioned, you can wrap this up with exceptions instead:
try:
op('somepath').someaction...
except:
pass
Secondly, if you have that OP as an object already in your script (or in storage) but you think the original operator it referes to, may have been deleted, you can quickly check with its .valid member (or add more try/accept pairs in your code).
Cheers,
Rob.