title: Google spreadsheet script: toString() not returning a string?
body: <p>I'm writing a very simple google spreadsheets script and need to compare strings. For some reason, when I call toString() on the content of a cell, I get a type error: "TypeError: Cannot find function includes in object Semester Long Clinics. (line 6)", where in this case "Semester Long Clinics" is the actual content of the cell. Here's the code: </p>
  
  <pre><code>function getStudents(input, clinicName, columnNumber) { 
    var toPrint = []
    var i = 0; 
    for(i; i &lt; 43; i++){
    var toCheck = input[i][columnNumber - 1].toString()
     if(toCheck.includes(clinicName)){
        toPrint.push(input[i][0].toString() + ", " + input[i][1].toString() +     ", " + input[i][2].toString())
       }
    }
    return toPrint
  }
  </code></pre>
  
  <p>The only explanation I can think of is that the input array contains instances of some sort of object that resists the standard toString() method, but I'm not sure what the advantages of that would be. Any help is much appreciated! </p>