Adding some validations for parameters