Fix #6142. Check for the argument name to be falsy

In some cases (see #6142 for a minimized testcase), the argument name is
returned as null instead of undefined as the code expects. This fix
simply changes to check for name to be falsy (in which case it will be
assinged a generated name).
Merge pull request #6143 from busykai/fix-6142

Fix #6142. Check for the argument name to be falsy