added validation for presence of professor