remove empty array from array javascript