Fix  npm already exists check

I have encountered the following error when I was trying to use a module name which is already in use.
```
TypeError: Cannot read property 'log' of undefined
    at /Users/stefanbuck/projects/generator-node/app/index.js:31:17
```