Check if params are valid