Implement AND and OR predicates