to check whether the given string is a palindrome or not