Should this line be is.null() instead of is.na()? When this gets called by model2netcdf.ED2(), time is a complex nested list.
This results in a warning in older versions of R but are errors in R > 4.2.0 (see NEWS)
Tests run on older versions of R should be run with with _R_CHECK_LENGTH_1_CONDITION_=true to catch these as errors (I will open a separate issue for this though once I confirm if they currently are not run like this)