Check if input is palindrome or not