if -z not working in SH shell

Hello all,

Any idea how to check whether a variable holding null value or not. if -z option works fine in bash, where as it is not working in sh.

bash-3.00$ sh
$ TEST=
$ if [ -z $TEST ] ; then
> echo "Null"
> else
> echo "Not null"
> fi
sh: test: 0403-004 Specify a parameter with this command.
Not null
$

The test fails. The same works in bash.

bash-3.00$ TEST=
bash-3.00$ if [ -z $TEST ] ; then
> echo "Null"
> else
> echo "Not null"
> fi
Null
bash-3.00$

I need this testing working in sh. Please help.

Thanks,
Rijesh.

$ if [ -z $TEST ] ; then

TRY this
$ if [ ! -n $TEST ] ; then

try

if test -z "$TEST"
then
   ...
fi

or

if [ -z "$TEST" ]
then
   ...
fi