Refactor EXISTS to a unary operator