Fixing powershell issue with null value expression