Enhanced input validation with support for basic types and improved error messages
check_input(
x,
type = NULL,
length = NULL,
min_length = NULL,
max_length = NULL,
allow_null = FALSE,
arg_name = "input"
)Invisible TRUE if valid, throws error otherwise
Object to check
Expected type (can be basic type like "numeric", "character" or class name)
Expected length (optional)
Minimum length (optional)
Maximum length (optional)
Whether NULL is allowed
Name of the argument for error messages