title: Deserialized JSON object not null for wrong type
body: <p>If i have the following c# record:</p>
  <pre><code>public record MyRecord(string EndPoint, string Id);
  </code></pre>
  <p>and i have some json that i attempt to deserialize to my type:</p>
  <pre><code>var myType= JsonSerializer.Deserialize&lt;MyRecord&gt;(
              jsonStr,
              new JsonSerializerOptions
              {
                  PropertyNameCaseInsensitive = true
              }
          );
  
        if(myType is null)
        {
           ...
        }
  </code></pre>
  <p>where <code>jsonStr</code> is not of type <code>MyRecord</code> but some other type, the resulting <code>myType</code> rather then being null, is simply an instance of MyRecord but with empty properties. How can i check that the returned type is invalid if its not null ?</p>