Added __contains__ method.