title: Why $Null validation failed in powershell function?
body: <p>team!</p>
  <p>I have validation script for parameter $Data.
  It fail when it get $null.</p>
  <p>whats wrong?</p>
  <pre><code>[CmdletBinding()]
      Param (
          [Parameter(  HelpMessage = &quot;PsObject data.&quot; )]
          [AllowNull()]
          [AllowEmptyCollection()]
          [AllowEmptyString()]
          [ValidateScript({
              if ( ( $_ -eq $null ) -or ( $_ -eq '' ) ){
                  $true
              }
              else {
                  (( !( $_.GetType().IsValueType ) ) -and ( $_ -isnot [string] ))
              }
          })]        
          $Data,
  ...
  
  $UserObject = Show-ColoredTable -Data $null -View 'SamAccountName', 'Name', 'DistinguishedName', 'Enabled'  -Title &quot;AD User list&quot; -SelectMessage &quot;Select AD user(s) to disable VPN access: &quot; -AddRowNumbers -AddNewLine -SelectField &quot;SamAccountName&quot;
  </code></pre>