Clarified test commands

You can just test if the string is null directly.