title: Can not render different results with conditional rendering
body: <p>I am trying to check if the user has a username to allow him to upload images otherwise i want to ask the user to login but i try to do that this error appears :</p>
  <pre><code>TypeError: Cannot read property 'displayName' of null
  
  App
  C:/Users/User/Desktop/try-react/new-app/src/App.js:91
  </code></pre>
  <p>this it the code which causes the error:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>return (
      &lt;div className="app"&gt;
   
          {user.displayName  ? &lt;ImageUpload  username={user.displayName} /&gt; : &lt;h3&gt;login&lt;/h3&gt;}
          </code></pre>
  </div>
  </div>
  </p>