Check if an argument is a character scalar. Optionally allows NULL.
Value
If the argument is a character scalar, it returns invisible
NULL. Otherwise, the function throws an error.
Examples
if (FALSE) { # \dontrun{
check_string("text")
check_string("")
check_string(NULL, alt_null = TRUE)
check_string(1)
check_string(c("a", "b"))
} # }