Small cleanup in profile validation code.