title: "Resource not found" displaying icon in AppleScript
body: <p>I am new to apple scripting and I have a simple apple script which does below-</p>
  
  <pre><code>display dialog "Enter Your User Name:" default answer ""
  set theUser to the text returned of the result
  </code></pre>
  
  <p>Now if the user enters nothing and clicks <code>OK</code> I do a check something like</p>
  
  <pre><code>if theUser = "" then
      display dialog "User name is mandatory" buttons {"OK"} with title "Missing parameter" with icon "stop"
      set theError to button returned of the result
      if theError is "OK" then quit
  end if
  </code></pre>
  
  <p>But it gives me a <code>Resource wasn't found.</code> error popup when the <code>if</code> condition is checked. I have tries <code>theUser is in {"",value missing}</code>, <code>theUser is missing value</code> etc. but these don't work either. Whats wrong here?</p>