Javascript Array Not Empty