How to check for a defined variable?

What is the proper way of checking if a variable has a defined value?
It is possible to check if it has length zero, but when it is undefined it will error-out with “no such item”.
I have a script which requires some configuration values, and a separate script that loads them into :global variables.
Now, the first script always calls the second to setup these variables. When I could check “if variable is undefined”
I could call the script only when that is the case. However, all methods I tried so far result in a fatal error. The check
for zero length works when I empty the variable from winbox, the next time around it sees the empty value and calls
the script to reset it, but when the variable is “not there” instead of empty, it fails.