Check if an argument is a nonnegative numeric scalar.
Value
If the argument is a nonnegative numeric scalar, it returns invisible
NULL. Otherwise, the function throws an error.
Examples
if (FALSE) { # \dontrun{
check_nonnegative_scalar(5)
check_nonnegative_scalar(0)
check_nonnegative_scalar(-3)
check_nonnegative_scalar("text")
check_nonnegative_scalar(c(1, 2))
check_nonnegative_scalar(NULL, alt_null = TRUE)
} # }