You will run into issuesTo figure out if a variable - "Foo" is empty and also contains no spaces (or no whitespace as some people refer it). To solve that, use:
if [[ -n "${Foo/[ ]*\n/}" ]];then
echo "Foo is not empty and contains non space characters"
fi
# Another way to solve the same problem: Take spaces out in Foo & check if Foo is empty
if [[ -z "${Foo// }" ]];then
echo "Foo is empty"
fi