Why does the property access fail despite the guard?type Result = | { ok: true; value: number } | { ok: false; error: string }; function handle(getR: () => Result) { if (getR().ok) { getR().value; } }