I think I've had issues with checking NULL (crashes) and had to use strlen. Unfortunately I haven't kept a test-case for this.