If I want to check for the null string I would do
[ -z $mystr ]
but what if I want to check whether the variable has been defined at all? O
call set without any arguments.. it outputs all the vars defined.. the last ones on the list would be the ones defined in your script.. so you could pipe its output to something that could figure out what things are defined and whats not