let r = 0; const A = {p: null, v: "3"}; const B = {v: "3"};
if ("p" in B) r++;
if (A.p === null) r++;