title: TypeError: Cannot read property 'address' of undefined in my api
body: <p>I try to create a user without a address or change the password in my api   and it returns: &quot;TypeError: Cannot read property 'address' of undefined&quot;</p>
  <p>here is my code :</p>
  <pre><code> UserScheme.pre('save', async function(next){
       const code = await geocoder.geocode(this.address)
       console.log(this.address)
       console.log(code)
      
       if(Array.isArray(code)&amp;&amp;code[0]){
               this.latitude = code[0].latitude
               this.longitude = code[0].longitude
  }
  </code></pre>
  <p>I already tried:</p>
  <pre><code> UserScheme.pre('save', async function(next){
       
       if(typeof address !== null){
             const code = await geocoder.geocode(this.address)
             console.log(this.address)
             console.log(code)
            if(Array.isArray(code)&amp;&amp;code[0]){
                    this.latitude = code[0].latitude
                    this.longitude = code[0].longitude
    }}
  </code></pre>
  <p>but when I fix the error with</p>
  <pre><code> if(typeof address !== 'undefined') 
  </code></pre>
  <p>it simply dont geocode</p>