title: How to check if an object contains a value?
body: <p>I need to check if an object contains any value. The following function works fine if the object is a String type but I was looking to replace this with a generic way without checking for the type. Is there a way to do this? Thanks in advance.</p>
  
  <pre><code> public void SetValue(int id, object fieldData)
      {
          if (fieldData!=null)
          {
              if (fieldData.GetType() == typeof(String) &amp;&amp; fieldData.Equals(string.Empty))
              {
                  return;
              }
          }
  
          SetLOValue(id, fieldData);
      }
  </code></pre>