Can never have too much error checking

Added some try/catch blocks around some type conversions that are used
when determining how to deal with incoming parameters and mapping them
to action parameters.