Adding basic validation to parameters