Function requireNonNull

  • A simple function that checks if a variable is undefined or null; Like Objects.requireNonNull in java.

    Parameters

    • object: any

      the object or variable to check.

    • Optionalmessage: string

      the Error message (if thrown).

    Returns any