Add isset check prior to output
Merge pull request #6 from ssx/fix_no_records_error

Add isset check prior to output