var x = "" if x == "": echo "empty" if x != "": echo "not empty" # Alternatively: if x.len == 0: echo "empty" if x.len > 0: echo "not empty"