title: Queue error "Uncaught TypeError: Cannot read property 'objects' of null"
body: <p>I'm trying to using queues to ensure my files are loaded fully before the script continues. However, when I load in my json map files and try to use them in a function, I get an error.</p>
  
  <pre><code>var counties = svg.append("g")
      .attr("id", "counties")
      .attr("class", "Blues");
  
  var states = svg.append("g")
      .attr("id", "states");
  
      queue()
      .defer(d3.json, "county.json")
      .defer(d3.json, "state.json")
      .defer(d3.json, "Crashes.json")
      .await(ready);
  
  function ready(county, state, crashes) {
      var countyFeatures = topojson.feature(county, county.objects.counties);
      var stateFeatures = topojson.feature(state, state.objects.states);
  
      /*
      counties.selectAll("path")
          .data(county.features)
        .enter().append("path")
          .attr("class", "q8-9")
          .attr("d", path);
  
      states.selectAll("path")
          .data(state.features)
        .enter().append("path")
          .attr("d", path);   
        */
  }
  </code></pre>
  
  <p>The error is <code>Uncaught TypeError: Cannot read property 'objects' of null</code></p>
  
  <p>Can someone explain why when passing into the function it is null? As opposed to running d3.json separately and using</p>
  
  <pre><code>d3.json("URL", function(d) {var temp = topojson.feature(d, d.objects.counties;});
  </code></pre>
  
  <p>Thanks.</p>