checktrait function

Checks the traits spelling compared to user input.