title: Automapper.ProjectTo() is throwing null reference exception
body: <p>I Have the following mapping :</p>
  <pre><code>        CreateMap&lt;PeopleForm, FormDto&gt;()
              .ForMember(des =&gt; des.Code, src =&gt; src.MapFrom(s =&gt; s.Code))
              .ForMember(des =&gt; des.Notes, src =&gt; src.MapFrom(s =&gt; s.FormNotes))
              //other mappings removed for breivity
              ;
  
          CreateMap&lt;FormNote, NoteDto&gt;()
              .ForMember(x =&gt; x.Note, cfg =&gt; cfg.MapFrom(y =&gt; y.Note));
  </code></pre>
  <p>and i want to query it :</p>
  <pre><code>        var query = _context.PeopleForms.Where(i =&gt; i.Id == id);
          var form = await _mapper.ProjectTo&lt;FormDto&gt;(query).FirstOrDefaultAsync();--&gt;NullReferenceException
  </code></pre>
  <p>but it works when i comment out the mapping from FormNotes to Notes:</p>
  <pre><code>        CreateMap&lt;PeopleForm, FormDto&gt;()
              .ForMember(des =&gt; des.Code, src =&gt; src.MapFrom(s =&gt; s.Code))
              //.ForMember(des =&gt; des.Notes, src =&gt; src.MapFrom(s =&gt; s.FormNotes))--&gt; this line is the problem
               ;
  </code></pre>
  <p>and, the work around solution i came up with was to to a select in the mapping:</p>
  <pre><code>                .ForMember(des =&gt; des.Notes, src =&gt; src.MapFrom(s =&gt; s.FormNotes.Select(n=&gt; new 
                   NoteDto{Note = n.Note})))
  </code></pre>
  <p>i checked in the logs and it seems the issue is related mostly to Ef core :</p>
  <pre><code>             Microsoft.EntityFrameworkCore.Query: Error: An exception occurred while iterating over 
               the results of  a query for context type 'Backend.Infrastructure.MolsaContext'.
  </code></pre>
  <p>What should I do ? I have the exact mapping with another table(entity) and it works no problem, the only problem is with this particular mapping.</p>
  <p>what am I missing? is the related to AutoMapper or Ef core?</p>