fileTypeGroupID.HasValue ? (ContentItem n) => n.Document.MimeType.FileTypeGroupID == fileTypeGroupID.Value
: (ContentItem n) => true;
Note the conditional operator is the correct name for ? : It's an example of a ternary operator (and is the only ternary operator in many programming languages).