There are no errors if you use the tryparse for the conversion:
If you expect a double:
set Amount to 0.0 *> optional
invoke type System.Decimal::TryParse(TextBox17::Text, by reference Amount)
If you expect an integer:
set Amount to 0 *> optional
invoke type System.Int32::TryParse(TextBox17::Text, by reference Amount)
Each numeric class has its own parse & try parse