Let's start from the base that what you map is the structure, the null is data, although if you can validate in the mapping if there is certain data take an action, but the property must be defined because it is part of the object
Conditional Mapping
cfg.CreateMap<classOrigen,classDestino>()
.ForMember(dest => dest.Prop1, opt => opt.Condition(src => (src.Prop1 != null)));
in this case in both classes you have defined Prop1
but only apply according to the value imagine
public class classDestino{
public int Prop1 {get;set;}
}
public class classOrigen{
public int? Prop1 {get;set;}
}
As you will see, a class allows null but the destination does not, so that it does not fail, you add the condition