This is probably a silly question, but I haven't been able to divine an answer through the Squirrel reference docs or googling.
I'm used to Javascript (Actionscript, really), where I could test for the existence of an object property something like this:
if (obj.prop) {
// Property exists: do stuff:
}
else {
// Property DOES NOT exist: do something else:
}
If I try something similar with Squirrel (in my layouts), I get an error because the slot doesn't exist. Currently, I have a rat's next of try..catch statements to determine whether a slot exists, but it's messy (even though it works). Is there a cleaner way to handle checking whether a slot exists?