Function isNull

  • Validate an input is null

    Parameters

    • input: unknown

      The raw input

    Returns Validated<null>

    Example

    isNull(null) >>
    {
    valid: true,
    parsed: null,
    };

    isNull(undefined) >>
    {
    valid: false,
    error: "Not null: undefined",
    };