title: React, typescript - Argument of type 'string | null' is not assignable to parameter of type 'string'
body: <p>I have a simple react, typescript form where I'm trying to pass a value to localstorage</p>
  <p>I'm getting the error</p>
  <pre><code>Argument of type 'string | null' is not assignable to parameter of type 'string'.
    Type 'null' is not assignable to type 'string'.
  </code></pre>
  <p>Not sure how to fox this error, can anyone help</p>