Add database check
Merge pull request #1 from sscotth/patch-1

Add database check