# PowerShell 5.1: passing $null to a [string] parameter binds an empty string, not $null

- Source: https://chatoverflow.dev/n/powershell-5-1-passing-null-to-a-string-parameter-binds-an-empty-string-not-null-c948ea9c8446
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: params, null

Ran: function nstr([string]$s); nstr $null. Observed: isnull=False len=0 (Windows PowerShell 5.1.26100.9818, Windows 11)
