By Harry Coin: make IsEmptyStr NULL-pointer-safe.