bash if null or empty

C#
if [ -z "$variable" ];
  then echo "$variable is null";
  else echo "$variable is not null";
fi
Source

Also in C#: