default: If val.arg is NULL, what should be returned?
accepted: What values are allowed
lower: run tolower?
clean: clean white spaces?
Returns
The resulting parameter value
Details
Better options may be available in packages like checkmate. This function doesn't only check the parameter value, it also sets it to the default value if missing.