Define predicate helper