Because this Invoke(q => q.FullName.Contains("Milad"), f)
is a MethodCallExpression and
this
BinaryExpression binaryExpression = expression as BinaryExpression;
if (binaryExpression == null) return null;
returns null, beacuse it is not a BinaryExpression.
Moreover True
is a ConstantExpression. You need more complex code to parse it and handle all this options.
Try to use this: metalinq