Test checkDatabaseExists