CRM-15311 condition on is_array rather than remove