Way to check if element exists in a list