Is NULL or NA

is_null_or_na(x)

Arguments

x

object to be tested

Value

TRUE if object is NULL or NA, logical vector for objects of length > 1

Examples

is_null_or_na(NA)
#> [1] TRUE
is_null_or_na(NULL)
#> [1] TRUE
is_null_or_na(c(2, NA, 5))
#> [1] FALSE TRUE FALSE