Javascript If Array Is Undefined