Simple, just add an AND clause to check if it’s not null: As of C# 6, you can also use a null conditional operator ?.: This will essentially resolve the Name property to null if MyOtherObject is null, which will fail the comparison with “Name”. Try it online. You can just make your predicate check for null… I would do something like this:
