Use minLength in isPalindrome