title: Checking if an object is null
body: <p>I am coding a MVC 5 internet application, and I have a question in regards to checking if an object is null or not, before setting some values in the object.</p>
  
  <p>Here is some example code:</p>
  
  <pre><code>public async Task TestFunction(TestObject obj)
  {
      obj.name = "Test Name";
      repository.Insert(obj);
  }
  </code></pre>
  
  <p>Should the check to see if the object is null be done before the function call every time? Is there any need at all to check if the object is null within the function call?</p>
  
  <p>Thanks in advance.</p>