This function checks whether an object is_bool_scalar(). If the check
fails, a formatted error is raised using cli::cli_abort().
Value
Invisibly returns TRUE on check pass. Throws a error of class
rlang::rlang_error on check fail.
Examples
check_bool_scalar(TRUE) # passes
check_bool_scalar(FALSE) # passes
if (FALSE) { # \dontrun{
check_bool_scalar(NA) # throws error
check_bool_scalar(c(TRUE,FALSE)) # throws error
check_bool_scalar("TRUE") # throws error
} # }