Javascript If Array Is Not Empty