title: how to know if the Element class is empty or null in Jsoup
body: <p>I'm trying to gather the images of a list of articles using the Jsoup library from <a href="http://www.ilfattoquotidiano.it/" rel="nofollow">this</a> url.</p>
  
  <p>When an article hasn't an image embedded I use a standard picture. Here is what I do:</p>
  
  <pre><code>for(Element img : document.select(".rullo .rullo-item .lazy&gt;a img[src]")) {
      String imageMainUrl = img.attr("src");
      if(img.attr("src") == null || img.attr("src").equals("") || 
             img.attr("src").isEmpty()){
          images.add(bmp);
      } else {
          String newString = imageMainUrl.replace("data:image/gif;base64,", "");
          byte[] decodedString = Base64.decode(imageMainUrl, Base64.DEFAULT);
          Bitmap bitmap = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);                  
          images.add(bitmap);
      }                   
  }
  </code></pre>
  
  <p>But the problem is that it never enter in the <code>if</code> section; how can I know if the element is empty or null? Thanks!</p>