The style…
[ -n "$VARNAME" ] || VARNAME="xxx"
in Whonix source code served well but is not the most ideal. The following would be a bit better.
[[ -v VARNAME ]] || VARNAME="xxx"
That is because then scripts could be improved and use:
set -o nounset