joyent/node — pull request #6525 by coderaiser (2013-11-15 17:38:51+00:00)
Title: fix(zlib) add check is callback is function

Add check is callback is function to prevent next error.
```js
zlib.js:160
callback(err);
^
TypeError: undefined is not a function
at Unzip.onError (zlib.js:160:5)
at Unzip.EventEmitter.emit (events.js:95:17)
at Zlib._binding.onerror (zlib.js:298:10)
```

I have one suggestion. Could be used construction like this:
```js
function exec (callback, params) {
if (util.isFunction(callback))
callback(params);
}
```
Like it's done [here](https://github.com/coderaiser/cloudcmd/blob/master/lib/util.js#L901 "Cloud Commander"). So there is would be less code.