Added a check if a given parameter exists before trying to cast a value to it. Fixes #2713
Fixed a missing line in the last commit.
Merge pull request #2714 from mrbichel/master

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