All you really need is for nothing to be defined before you use it. As a general rule you would declare any variables before you use them first, so you would avoid the reference error.
var nothing = null;
var something = [1, 2, 3];
Array.isArray(someUndefinedVariable) // Will fail, 'someUndefinedVariable' hasn't been defined yet.
Array.isArray(nothing); // This will work and return false.
Array.isArray(something); // This will work and return true.
Well, the OP does use typeof in his code
Alas, typeof will just say that an array is of the object type.