Added check for isPalindrome with generic backend that can be reused for other methods