check if element exists in set javascript