title: Check if image column is Null VB.NET
body: <p>Good Day everyone. I need help with my code below.</p>
  
  <p>Dim stream As New MemoryStream()</p>
  
  <pre><code>        connect()
          Dim command As New SqlCommand("SELECT image FROM tblHouseholdMembers WHERE id= '" &amp; lvmem.FocusedItem.Text &amp; "'", cn)
          Dim image As Byte() = DirectCast(command.ExecuteScalar(), Byte()) --&gt; 'Error message of null image
          stream.Write(image, 0, image.Length)
          cn.Close()
          Dim bitmap As New Bitmap(stream)
          pbProfilePic.Image = bitmap
  </code></pre>
  
  <p>I want to put a messagebox to identify if it's null before the error cast. </p>