title: Issues looping through a list of arrays with null data
body: <p>This is my first question here, hoping you can help. Currently I am trying to loop through an API list of 100 arrays all of which contain one string of data. My loop filters through for numerical data and prints it to a div id. However when I hit data with "#N/A" instead of digits, it breaks my loop. I have tried nesting an if statement that would check if data is null or not, but as it treats null data as an object, this does not work. I have included commented out code to show the things I have tried:</p>
  
  <pre><code>var xhr = new XMLHttpRequest();
  
  var URL = "https://spreadsheets.google.com/feeds/list/0AhySzEddwIC1dEtpWF9hQUhCWURZNEViUmpUeVgwdGc/1/public/basic?alt=json";
  
  xhr.open("GET", URL, false);
  xhr.send();
  
  var statusResponseStringify = JSON.stringify(xhr.responseText, "", 2);
  var statusResponseParse = JSON.parse(xhr.responseText);
  var Find = statusResponseParse.feed.entry;
  
  for (var i = 0; i &lt; Find.length; i++) {
  
  
  var FTSEContent = statusResponseParse.feed.entry[i].content.$t;
  document.getElementById("FTSEName").innerHTML+=FTSEContent + "&lt;br&gt;&lt;br&gt;";
  
  var text = FTSEContent;
  
  var value = text.match(/(\d[\d\.]*)/g);
  
  //var price = value[0];
  //var change = value[1];
  
  console.log(value);
  
  
  /*if (typeof value === "number") {
  document.getElementById("Change").innerHTML+=value + "&lt;br&gt;";
  }
  else if (typeof value === null) {
  document.getElementById("Change").innerHTML+="N/A" + "&lt;br&gt;";
  }
  else if (typeof value === "object") {
  document.getElementById("Change").innerHTML+="Smell" + "&lt;br&gt;";
  }
  else {
  document.getElementById("Change").innerHTML+="poo" + "&lt;br&gt;";
  };*/
  
  
  if (typeof value == "undefined") {
  document.getElementById("Print").innerHTML+="N/A" + "&lt;br&gt;";
  }
  else {
  document.getElementById("Print").innerHTML+=value[0] + "&lt;br&gt;";
  };
  
  };
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/cTk5Z.jpg" rel="nofollow">This is the console I get back when I run this code</a></p>
  
  <p>Could anyone help me with some code ideas to circumvent the null responses when looping. I would ideally like to print the numbers and print an N/A whenever there is a null or #N/A within the API data. </p>
  
  <p>Thank you all!</p>