Function Test-IsCollectionNullOrEmpty { <# .SYNOPSIS Simple Null or Empty Filter #> [CmdletBinding()] [OutputType([System.Boolean])] Param( [Parameter(Mandatory=$false, Position=0)] $Collection ) if ($null -eq $collection -or ([array]$collection).Count -eq 0) { return $true } return $false } Set-Alias IsCollectionNullOrEmpty Test-IsCollectionNullOrEmpty -Force -Scope:Global