Fixes #2713  | Added a check if a given parameter exists before trying to  ...

...cast a value to it.