Or:
if (%avar == $null) OR (%bvar == $null) { goto end }
You can't use OR in mIRC scripting. || means OR.
Also, although mIRC allows you to not use every parentheses that you should be using, it's not really good coding style to skip them.
Rather than:
if %a == 1 { echo -a hi }
It's better to use the parentheses:
if (%a == 1) { echo -a hi }
The same is true for multiple checks as in the example... you should use:
if ((%avar == $null) || (%bvar == $null)) { goto end }
Instead of:
if (%avar == $null) || (%bvar == $null) { goto end }
It will work both ways, but it's better coding style to use all appropriate parentheses. It can also make it easier to understand.