Add nil check for SQL result object
Merge pull request #49 from BigGillyStyle/sql_patch

Add nil check for SQL result object