Follow-up:

* use `arguments.length` instead of checking whether the last parameter is
  undefined.