How To Check If Array Is Not Empty In Javascript