Utility function to check whether an object is null or belongs to a particular class.

.check_if_null_or_belongs_to_class(
  object,
  proper_class,
  parameter_name,
  mode = "any"
)

Arguments

object

An object whose class needs checking,

proper_class

A string describing the desired class of object.

parameter_name

A string containing the name the tested parameter had in the initial function in which it was passed.

mode

Optional. A string describing the desired mode of object. Use only if proper_class is vector. Mode cannot be Date. Use proper_class = "Date" for checking class of Date vector.

Value

TRUE if all tests were passed. Throws an error otherwise.