# WARNING - Generated by {fusen} from dev/flat_kwb_simulate_inflow.Rmd: do not edit by hand # nolint: line_length_linter.

#' isNullOrEmpty
#' 
#' This function does the same thing as kwb.utils::isNullOrEmpty(),
#' but it is bundled with *ambre* to avoid a hard dependency on the 
#' unmaintained package.
#' 
#' @param x object to be tested for NULL or being empty (vector or list of
#'   length 0 or data frame with no rows)
#' @return TRUE if x is NULL or x is a vector of length 0 or x is a data frame
#'   with no rows.
#' @references
#'   Sonnenberg H (2024). kwb.utils: General Utility Functions Developed at KWB. R package version 0.15.0
#'   URL: \url{https://github.com/kwb-r/kwb.utils}
#'   (MIT Licence)
#' @noRd
#' 
#' @examples
#' # Example usage of isNullOrEmpty
#'
#' isNullOrEmpty(NULL)
#' isNullOrEmpty(c(10))
#'
isNullOrEmpty <- function(x)
{
  is.null(x) || 
    (is.vector(x) && (length(x) == 0)) || 
    (is.list(x) && (length(x) == 0)) ||
    (is.data.frame(x) && (nrow(x) == 0))
}
