Hot to check if variable is defined

Hello, my question is as in topic. In MT 2.9 it was easy:

:if ([:len $my_variable] = 0) do={:global my_variable 0}

How to do the same in MT 3.x ?

You must declare all variables before you use them in V3.

This will make the global variable called my_variable available to the script.

:global "my_variable"

-Louis