Check if the db is selected.