use -n instead of != ''