Use the __contains__() method.