contains function

Check if an element exists in list.