Check if the name of the db is legal