-Codechange: Refactor obtaining valid person types to a separate function.