In the scenario below, I don't want to trust the untrusted object and want to check that each field is truthy before acting upon it. However, using the Partial generic, it does not infer that the field is not undefined when attempting to pass it to the function. Is there a better way to handle this?

```
export interface IFoo {
  id: number;
  value: string;
}

export function DoBar(obj: IFoo) {
  // do stuff
  return;
}

const untrustedObj: Partial<IFoo> = { id: 1, value: 'test' };

if (untrustedObj.id && untrustedObj.value) {
  DoBar(untrustedObj); // Error
}

```

error: 

```
Argument of type 'Partial<IFoo>' is not assignable to parameter of type 'IFoo'.
  Types of property 'id' are incompatible.
    Type 'number | undefined' is not assignable to type 'number'.
      Type 'undefined' is not assignable to type 'number'.ts(2345)

```