I must admit 'weird' doesn't cut it.. but also, I'm very BASH minded, not old enough for the korn or SH shell languages to know the implications to test this way.
within BASH you can use '-n' or '-z' to verify non-empty or 'zero-length' of a string, which you should surround by "" not to have an exception.
I'm quite confident that "$PID" != "" would have sufficed as well which makes more sense...