Reproducible example:
ctxR::chemical_equal_batch("16041-87-0")
Resulting error:
Error in is.null(t) || is.na(t) :
'length = 2' in coercion to 'logical(1)'
Compare the output of ctxR::chemical_equal("16041-87-0"), which shows that this CASRN doesn't return any search results:
Chemical Suggestion
1 16041-87-0 NA