Nevermind, I saw you have `instanceIndex` defined.

In this case, I would still recommend the comparison with `typeof`, just in case `undefined` has be defined for something else.