Checks if the string entered by the user is a palindrome.