This function checks if an object is considered empty based on its class.
Examples
# Vector
vec <- numeric(0)
is.empty(vec) # Returns TRUE
#> Error in is.empty.default(vec): is.empty is not defined for objects of class numeric
# List
lst <- list()
is.empty(lst) # Returns TRUE
#> [1] TRUE
# Data frame
df <- data.frame()
is.empty(df) # Returns TRUE
#> [1] TRUE