added character race validation logic