This is just a "shortcut" to "length(x) == 0L"
Examples
hasZeroLength(character()) # TRUE
#> [1] TRUE
hasZeroLength(list()) # TRUE
#> [1] TRUE
# Do not confuse, has nothing to do with the length of a string
# here: vector of length one
hasZeroLength("") # FALSE
#> [1] FALSE
# Remember that the length of a data frame is the number of its columns
hasZeroLength(data.frame(a = character())) # FALSE
#> [1] FALSE