added case for undefined data so pagination returns empty
Merge pull request #54 from mgan59/improvements-hbs-helper

added case for undefined data so pagination returns empty