score:8

Accepted answer
expression<func<t, bool>> falsepredicate = x => false;

score:6

can you wrap the entire thing in an if-else expression?

meaning:

if input
    return <your normal code>
else
    return false

the return is implicit in expressions; the return value of the expression will simply be the last value. so you could try:

    expression.condition
    (
      expression.notequal(input, expression.constant("")), 
      normalsearchexpression, 
      expression.constant(false)
    )

that's assuming normalsearchexpression also returns a bool.


Related Query

More Query from same tag