It is really in my repository that the error is occuring:
CMS.DocumentEngine.Types.IATTC.ContentItem.ContentItemFields.Picture.get returned null.
I tried the follwoing and it works:
private Func<CMS.DocumentEngine.Types.ContentItem, ContentItemDto> ContentItemDtoSelect => item => new ContentItemDto()
Picture = item.Picture != Guid.Empty ? item.Fields.Picture : null,
PictureURL =item.Picture != Guid.Empty ? item.Fields.Picture.AttachmentUrl : "",
Title = item.Title,
Text = item.Content,
NodeAlias = item.NodeAlias,
NodeGuid = item.NodeGUID,
NodeId = item.NodeID,
The field need to be tested before trying to get its value.
Thank you very much for your time