property length is undefined in javascript?

Hi, I have this code:

/**
  * @type {JSDataSet}
 */
var dataset = databaseManager.getDataSetByQuery(...);

if(dataset.getValue(1,5).length < 6) {
...
}

I receive this warning:

property length is undefined in javascript

How can I do to set the type of dataset.getValue(1,5) (it’s a string value)?

Thanks,

Well, the value could be null, so you should check it first, like:

if(dataset.getValue(1,5) && dataset.getValue(1,5).length < 6) {
...
}

If your curious to see what the type is, use:

application.output(typeof dataset.getValue(1,5))