Instead of null checks you can simply write for example Result.OrDefault(() => SelectedItem.Invoice.Employee.Name.ToString());
Install-Package Result.OrDefault -Version 1.0.9
dotnet add package Result.OrDefault --version 1.0.9
<PackageReference Include="Result.OrDefault" Version="1.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Result.OrDefault --version 1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
This package has no dependencies.