Code Analysis ReferenceAnalyzersRCS1202On this pageRCS1202: Avoid NullReferenceExceptionPropertiesPropertyValueDefault SeverityInfoMinimum language version-ExamplesExample #1diagnostic.csstring s = items.FirstOrDefault().ToString();fix.csstring s = items.FirstOrDefault()?.ToString();Applies toPackage Roslynator.Analyzers