catch situations where nil would cause array index exceptions

If there is no internet connection, the JSON data returned is nil, which will raise exceptions when passed along to the array[i].  In the version it will just return NO, if nil is passed in and with the JSON loader it return nil on error.