title: Detecting nullable types in C#
body: <p>I have a method that is defined like such:</p>
  
  <pre><code>public bool IsValid(string propertyName, object propertyValue)
  {
    bool isValid = true;
    // Validate property based on type here
    return isValid;
  }
  </code></pre>
  
  <p>I would like to do something like:</p>
  
  <pre><code>if (propertyValue is bool?)
  {
    // Ensure that the property is true
  }
  </code></pre>
  
  <p>My challenge is, I'm not sure how to detect whether my propertyValue is a nullable bool or not. Can someone tell me how to do this?</p>
  
  <p>Thank you!</p>