info exists varName
Returns 1 if the variable named varName exists in the current context (either as a global or local variable) and has been defined by being given a value, returns 0 otherwise.
See also:
Called with a variable or array element name (no $ in front!), returns 1 if the variable or array element exists, else 0.