incorrect null handling fix
NotFound handling fixed
Merge pull request #84 from IDgis/database-fix

No database result handling fixes