assertFunction method Null safety

SassFunction assertFunction(
  1. [String? name]
)

Throws a SassScriptException if this isn't a function reference.

If this came from a function argument, name is the argument name (without the $). It's used for error reporting.

Implementation

SassFunction assertFunction([String? name]) =>
    throw _exception("$this is not a function reference.", name);