check if element not in list javascript