powered by
Check weights vector (non-negative, finite, correct length)
check_weights(w, n, arg = as.character(substitute(w)))