Any person who is defined as a student in accordance with chapter 34, part 1 of this title and any person engaged in advanced training in medicine or dentistry as an intern or resident shall not be eligible for membership in the retirement system. In any case of doubt, the board of trustees shall determine whether an employee is a student.