Amazon Interview Question

Write a function to check if a word is a palindrome