Pergunta de entrevista da empresa iCIMS

How would you check if a given string is a valid palindrome?