Detect valid symbols before converting RE from infix to prefix.

Also catch any exception in the GUI and report the message to the user.