The PowerShell pipeline unwraps collections. Let's write a function to test to see if something is a collection
function Test-Collection {
param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
$InputObject
)
process {
$InputObject -is [System.Collections.ICollection]