Updated palindromes_solution

Fixed conditional check.