I think we can reduce this down and remove the `isPromise` call this way:

```js
if (!result) {
    failure.apply(ctx, ['message'].concat(args));
} else {
    when(result).then(passed, defered.reject);
}
``'