#' Null Distribution
#'
#' Sometimes it's convenient to work with a distribution object that is
#' akin to a missing value. This is especially true when programmatically
#' outputting distributions, such as when a distribution fails to fit to
#' data. This function makes such a distribution object. It always evaluates
#' to `NA`.
#'
#' @returns A Null distribution.
#' @examples
#' x <- dst_null()
#' mean(x)
#' eval_pmf(x, at = 1:10)
#' @export
dst_null <- function() {
  distribution(
    .parameters = NULL,
    cdf = function(x) {
      rep(NA_real_, length(x))
    },
    density = function(x) {
      rep(NA_real_, length(x))
    },
    hazard = function(x) {
      rep(NA_real_, length(x))
    },
    chf = function(x) {
      rep(NA_real_, length(x))
    },
    pmf = function(x) {
      rep(NA_real_, length(x))
    },
    odds = function(x) {
      rep(NA_real_, length(x))
    },
    return = function(x) {
      rep(NA_real_, length(x))
    },
    quantile = function(x) {
      rep(NA_real_, length(x))
    },
    mean = NA_real_,
    variance = NA_real_,
    skewness = NA_real_,
    kurtosis_exc = NA_real_,
    .name = "Null",
    .vtype = NA_character_
  )
}
