Handle undefined arguments

Tasks may "resolve" (aka call `next`) with `null, 123, undefined`
while the next task is defined as `arg1, arg2, nextArg`.

Before this fix, the task would've been called with `undefined, 123, next`,
thus mistakenly passing the `next` function to `arg2`,
and leaving `nextArg` undefined.