V16: Pattern matching from IPublishedContent to strongly typed model not working for Member Picker

Hi,

I wonder if anyone has even seen this before on Umbraco 16, but we work with strongly typed models for our content and also for the different member types that we have on our platform.

On Monday (20th of October), I began to upgrade our project from Umbraco 13 to Umbraco 16 (latest version on 13 to latest version on 16).

In Umbraco 13 we used the following code to check if a certification item has a valid candidate and profile item linked:

if (certification.Profile is not Profile profile || certification.Candidate is not Candidate candidate)
{
return null;
}

Unfortunately, after the upgrade to Umbraco 16, the second part of the if statement above returns “null” as the value for the “candidate” variable.

I had a look at all the documentation, but am not able to find anything related to this behavior. The member picker still returns a “IPublishedContent”, so I would’ve thought this logic simply still works.

Any help on this? Thanks in advance!