I don't think there's anything built into base R. But it's fairly easy to write your own:
dimnames2 <- function(x) {
if (is.vector(x)) {
list(names(x))
} else {
d <- dimnames(x)
if (is.null(d)) {
rep(list(NULL), length(dim(x)))
} else {
d
}
}
}
dimnames2(1:10)
dimnames2(matrix(1:10))