please be more strict with comparisons, check with is_array (or at least  !== false)