title: Flow Type complains about class property assigned via react ref
body: <p>I've started using Flow type on top of a project created with create-react-app tool. I struggle to make a simple scenario work where a class property is filled with element reference in render method but throws 2 errors. What am I doing wrong? All the checks should prevent those warnings.</p>
  
  <pre><code>class MyComponent extends React.Component&lt;*&gt; {
    input: ?HTMLInputElement;
  
    componentDidUpdate = () =&gt; {
      if (this.input) {
          this.input.focus();
          if (this.input.value) {
              const valueLength = this.input.value.length;
              this.input.setSelectionRange(valueLength, valueLength);
          }
      }
    };
  
    render() {
      return &lt;input ref={ref =&gt; (this.input = ref)} /&gt;;
    }
  }
  
       Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/todo/index.js:38:28
  
   Property value is missing in null or undefined [1].
  
    [1] 33│     input: ?HTMLInputElement;
        34│
        35│     componentDidUpdate = () =&gt; {
        36│         if (this.input) {
        37│             this.input.focus();
        38│             if (this.input.value) {
        39│                 const valueLength = this.input.value.length;
        40│                 this.input.setSelectionRange(valueLength, valueLength);
        41│             }
  
  
   Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/todo/index.js:40:28
  
   Cannot call this.input.setSelectionRange because property setSelectionRange is missing in null or undefined [1].
  
    [1] 33│     input: ?HTMLInputElement;
        34│
        35│     componentDidUpdate = () =&gt; {
        36│         if (this.input) {
        37│             this.input.focus();
        38│             if (this.input.value) {
        39│                 const valueLength = this.input.value.length;
        40│                 this.input.setSelectionRange(valueLength, valueLength);
        41│             }
        42│         }
        43│     };
  </code></pre>