title: powershell testing a variable that hasnt being assign yet
body: <p>I want to test to see if a variable has been assigned a variable and if not perform action.  How can this be achieve?   </p>
  
  <p>I've attempted it with the following code but receive the error: The right operand of '-is' must be a type.</p>
  
  <p>$ProgramName is not assigned at this point.  </p>
  
  <pre><code>If ($ProgramName -isnot $null) {
      $ProgramName = $ProgramName + ', ' + $cncPrograms
  }
  Else {
      If ($cncPrograms -isnot $null) {
      $ProgramName = $cncPrograms 
      }
  }
  </code></pre>