IMO the goal of this test is to determine if the argument was passed by the caller or took the default `undefined` value.  In addition to `null` there are lots of other values that could be passed that would also fail the for of loop.