title: Uncaught TypeError: Cannot read property 'length' of undefined Google Map V3
body: <p>I know this been asked a tons of time, but I can't seem to find the correct answer to my problem.</p>
  
  <p>Its actually very straight forward:</p>
  
  <pre><code>service.getDetails(request, function(place, status) {
      if (status == google.maps.places.PlacesServiceStatus.OK) {
  </code></pre>
  
  <p>Was used prior to using getDetails on its photos, so we know it actually fetches non-empty data. Next,</p>
  
  <pre><code>for (var i = 0; i &lt; place.photos.length; i++) {
      ....
  }
  </code></pre>
  
  <p>Afterwards I used photos length.</p>
  
  <p>Please NOTE: 
  It works fine, UNLESS the place actually has NO pictures to pull.... now it is throwing it off with the "Uncaught TypeError: Cannot read property 'length' of undefined".</p>
  
  <p>Is there a condition I can put prior to calling the place.photos.length so I can eliminate this error message?</p>
  
  <p>Thanks for reading! Please help out.</p>