Unless they start passing in some bizarre parameters it's assumed that if args is an object and not an array then args was not passed in and args is actually execOptions and execOptions is actually the callback. I can add an additional check to be extra safe i suppose :).

All of this logic would get more complicated if i made the callback the last parameter though... Even with the above snippet you wrote. I would still have to account for the fact that there is now an extra optional parameter that may or may not be passed in before the callback. The code starts to get complicated and nasty looking pretty quick with too many optional parameters. I'll try and write something up and see what i come up with.