title: Avoiding null reference exceptions
body: <p>Apparently the vast majority of errors in code are null reference exceptions. Are there any general techniques to avoid encountering null reference errors?</p>
  
  <p>Unless I am mistaken, I am aware that in languages such as F# is it not possible to have a null value. But thats not the question, I'm asking how to avoid null reference errors in languages such as C#.</p>