Check out example codes for "bash if null or empty". It will help you in understanding the concepts better.

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com