Bar class updated

New fonctions checking if a Bar is valid or not.