How to check whether a identifier is defined within the current scope?

In case you still need to do this in v0.6. Here is a macro that checks if a variable is defined in a local scope: Check whether a variable is defined - #3 by mike