Issue #9: simplifying database check