This question already has an answer here:
Does anyone know an easy way to check if an item is a member in a comma-separated list?
Something like this would be excellent:
The above would expand to
elem1 is in the list.