OTC Markets Group interview question

How would you write a function to check if something is a palindrome?