title: convert string "" to type 'Integer' is not valid
body: <p>Why do I get <code>Conversion from string "" to type 'Integer' is not valid.</code>? Match is a string, and when I compare it to "" it gives me this error. The program works when values are entered etc. but if I want to check for an empty string (the last ElseIf) I get an error.</p>
  
  <pre><code>Dim total As Double
  Dim Match As String = ""
  
  If Match.EndsWith("HA") OrElse Match.Contains("ha") OrElse Match.Contains("Ha") Then
      Dim nonNumericCharacters As New Regex("\D")
      Dim numericOnlyString As String = nonNumericCharacters.Replace(Match, String.Empty)
      total = numericOnlyString * 10000
  ElseIf Match.Contains("Ha m²") Then
      Dim nonNumericCharacters As New Regex("\D")
      Dim numericOnlyString As String = nonNumericCharacters.Replace(Match, String.Empty)
      total = numericOnlyString * 10000
  ElseIf Match.Contains("m²") OrElse Match.Contains("sqm") Then
      Dim nonNumericCharacters As New Regex("\D")
      Dim numericOnlyString As String = nonNumericCharacters.Replace(Match, String.Empty)
      total = Val(numericOnlyString)
  ElseIf CInt(Match) = 0 OrElse Match = "" Then
      total = Val(String.Empty)
  Else
      total = Match
  End If
  MessageBox.Show(total)
  </code></pre>