Check for empty variables

# if VAR is empty
if [ "x$VAR" == "x" ];then
...
fi