Converts a NULL to NA_character_; or returns the argument unchanged otherwise
Source:R/misc.R
NULL_to_charNA.Rd
This is useful for missing list elements (which returns NULL), but when the missing element in refClass should be NA_character_ (and NULL would return an error)