title: Some fields in document could be empty, and if i try to get result, App crashes because of nullPointerException
body: <p>I want to retrieve the profile image of the user(URL). The user could have set image or not. So if the image field is empty, I get an exception. How could I check beforehand that image field is empty and I avoid crashing the app</p>
  
  <p><img src="https://i.stack.imgur.com/CggGK.png" alt="test"></p>
  
  <p>firebaseFirestore.document("users/profiles/data/"+ad_poster_id).get().addOnCompleteListener(new OnCompleteListener() {</p>
  
  <pre><code>    @Override
      public void onComplete(@NonNull Task&lt;DocumentSnapshot&gt; task) { if(task.getResult().exists()){
  
              String profile_image = task.getResult().getString("image");
              if(profile_image!=null)
              Picasso.get().load(profile_image).into(circleImageView);
          }
  
      }
  });
  </code></pre>