Cannot call method toUpperCase of undefined
<pre><code>if (json.ScheduleCareProviderScheduledPatientsGetResult.Appointments[i].Patient.Firstname.toUpperCase().indexOf(searchBarValue.toUpperCase()) == 0) {
</code></pre>

<p>Why do i get this error. </p>
