additional checks in sql call for 404 status
Merge pull request #5 from mapbutcher/check_404

additional checks in sql call for 404 status