Hi Vincent,
$values is only being initialized as an array in line 870 (and the whole block is only being evaluated if $values is NOT an array in the first place), so the additional `if` that you are suggesting would be useless here.
Convinced? :)