title: Object reference not set to an instance of an object, null
body: <p>i keep getting this error message: <strong>Object reference not set to an instance of an object.</strong></p>
  
  <pre><code>  private static void GetIPInfo(User user)
    {
        string ipAddress = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString();
  
        string city = string.Empty;
        string region = string.Empty;
        string country = string.Empty;
        double? latitude = -1.00;
        double? longitude = -1.00;
  
        LocationTools.GetLocationFromIP(ipAddress, out city, out region, out country, out latitude, out longitude);
  
        user.IPAddress = user.IPAddress; **//error is pointing here**
    }
  </code></pre>
  
  <p>Do i need to instantiate something? </p>
  
  <p>Would it be something like this to solve the problem?</p>
  
  <pre><code> user.IPAddress new user.IPAddress = user.ipAddress;
  </code></pre>