Check if the word is a palindrome