Checking wether the given string is a palindrome