Check Empty Value In Array Javascript Function How To Use