R/mz_tab_utils.R
valueOrDefault.Rd
Check if x is null. If so, return defaultValue, otherwise run function on x and return the result. If a value x is encountered that is NULL, and nullable is set to FALSE, execution will be stopped and an error message will be printed.
valueOrDefault(x, FUN = identity, nullable = TRUE, defaultValue = "null", ...)
the argument to create a value for.
the function to apply to x, if x is not NULL.
if TRUE, NULL is a valid value, otherwise, an error will be raised.
the value to return, if x is NULL.
arguments that will be passed on to FUN.