fixes errors on null data

fixes errors thrown when provided with null array e.g.
['data',null,null]