Check for valid database before attempting to migrate.