Checks for existing database.