In R/4.2.1, is() returns error when the argument "class2" has more than one value. E.g.,
asd <- array(1:6, dim = c(2, 3))
class(asd)
[1] "matrix" "array"
is(asd, c("matrix", "array")) # show error about class2 length != 1
The solution is change is() to inherits().