added extra compare against NULL to keep gcc happy
drwxr-xr-x - ir