title: Function return string or boolean
body: <p>I want a function to return a String or Boolean. Something like this:</p>
  
  <pre><code>Public Function GetString(Byval What As String) 'As... someting?
      If (What = "A") Then
          Return "String to return"
      Else if (What = "B") Then
          Return True
      End If
  
      Return False 'Nothing to return
  End Function
  </code></pre>
  
  <p>How can i now do this? If i ask like</p>
  
  <pre><code>If GetString("A") Then
      MsgBox(GetString())
  End IF
  </code></pre>
  
  <p>...it returns a string and of course it gives an error on converting string to bool.
  I could always return strings and checks it lengths, but it feels bad. Or maybe I'm just into PHP too much?</p>
  
  <p>But is there a way to do it more like this? If i ask for "B" i know it would return a bool, if i ask for "A" i want to alert the string if there was any and so on.</p>