AddressHistoryEntity.AddressValue address = addressHistory.AddressHistory.EnumerateItems().FirstOrDefault();
var personDetails = PersonDetailsEntity.Create(
primaryName: person.PrimaryName.As<PersonDetailsEntity.PersonNameValue>(),
address: address.IsNotNullOrUndefined() ?
PersonDetailsEntity.AddressValue.Create(
line1: address.Line1.AsOptional(),
line2: address.Line2.AsOptional(),
line3: address.TownOrCity.AsOptional(),
line4: address.Region.AsOptional(),
postalCode: address.PostalCode.AsOptional()) : null);