nounset protection on defined check