title: Jest tests show Object is possibly 'null' errors
body: <p>I have some tests cases which are testing mongoose Models. But on running them with Jest (typescript code) I get many running errors :</p>
  <blockquote>
  <p>error TS2531: Object is possibly 'null'.</p>
  </blockquote>
  <p>Example code (error is on line 3) :</p>
  <pre><code>const user = await User.findById(&quot;id_test&quot;);
  expect(user).toBeDefined();
  expect(user.password).not.toBe(&quot;older_password&quot;);
  </code></pre>
  <p>Yes my user can be null, but it can be a unprecise test case but certainly not a blocking error...</p>
  <p>How can I make my test pass ? (Weither precising my test, weither silencing this type of error BUT I don't want to silence this error for the whole project, I want to silence only on tests file, not on src files).</p>