Quote var in conditional to avoid bash "unary operator expected" error when empty.