As time passes your datatable sometimes has data other times not (since you are looking at the last 5 minutes based on your query this is probably a smallish sample set).
See this solution for handling a potentially empty datatable:
You should be able to prevent the empty datatable from causing issues for your getCell
call too (note: getCell
defaults to using row 0
if now value is provided, see the docs)