Lua stdlib distinguishes nil from no argument

Lua's built-in load() function distinguishes nil from "no argument" for the optional "environment to run the code in" argument.

I always thought that Lua treated "no argument" the same as nil, but this is clearly not the case, as evidenced by there being two distinct C helpers:

This makes it possible to load() code within a nil environment, perhaps to detect any inadvertent references to global variables... but, to me, it feels like a footgun.