Add user input validation checks for overflows and wrong error types.
Add user input validation checks for overflows and wrong error types.

RidgeRun/gstd-1.x,RidgeRun/gstd-1.x,RidgeRun/gstd-1.x,RidgeRun/gstd-1.x