diff --git a/src/System.Management.Automation/engine/InternalCommands.cs b/src/System.Management.Automation/engine/InternalCommands.cs index 373098bf95..78338e08cc 100644 --- a/src/System.Management.Automation/engine/InternalCommands.cs +++ b/src/System.Management.Automation/engine/InternalCommands.cs @@ -509,7 +509,8 @@ namespace Microsoft.PowerShell.Commands private void ProcessParallelParameterSet() { // Validate piped InputObject - if (_inputObject.BaseObject is ScriptBlock) + if (_inputObject != null && + _inputObject.BaseObject is ScriptBlock) { WriteError( new ErrorRecord(