From a vector or list of values, select the first valid value, valid being defined as a value that is not NULL or NA and has, after being trimmed of whitespace, a nonzero length. Optionally, only look at the element with a given name.
first_valid_value(x, selectName = NULL)
The vector or list.
Optionally, the name to look at.
The first valid value (or NULL).