Check Empty Value In Array Javascript Iterations