Is this object the expected data type, and length one?
is_1(x, dtype = c("numeric", "logical", "character"))
x
The value to check
dtype
The data type. Default: "numeric". Also can be "logical" or "character"
"numeric"
"logical"
"character"
TRUE if x is dtype and length one.
TRUE