title: Strange JS Error: Uncaught TypeError: Cannot read property 'url' of null
body: <p>i got a really strange JS Error. 
  I get following Error in the console:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'url' of null (Line 83)
  </code></pre>
  
  <p>Line 83 looks like:</p>
  
  <pre><code> var image = '&lt;img class="news_image_options"src="http://www.example.com'+news_feed.posts[i].attachment.url+'"&gt;';
  </code></pre>
  
  <p>Now the logical conclusion would be that the there is no url property in the json feed. But it is there, i swear. 
  When i write the image-var in console.log I get following:</p>
  
  <pre><code>&lt;img class="news_image_options" src="http://www.example.com/2017/01/153386O.jpg"&gt; 
  </code></pre>
  
  <p>(The result I need!)</p>
  
  <p>The strange thing is that sometimes (with some news) I get the error and sometimes not...</p>