Added check for parameters when pressing summit button.