title: How to check null string type with go?
body: <p>DB:</p>
  
  <pre><code>column: name
  value: NULL
  </code></pre>
  
  <p>Get the record from DB with gorm, then</p>
  
  <pre><code>var name string
  if name != nil {
    //
  }
  </code></pre>
  
  <p>Got error:</p>
  
  <pre><code>invalid operation: name != nil (mismatched types string and nil)
  </code></pre>
  
  <p>Yes, nil is using for int type in go, but this case, the value in DB is <code>NULL</code> but not <code>""</code>, so it's necessary to check <code>null</code>, how to do?</p>