Check String Array Is Empty Javascript Function