subject function
Pairs value with the subject type it should be checked as.
A function because that is how it reads at the call site, which is the only reason it is not just the constructor.
Implementation
Subject subject(String type, Object? value) => Subject(type, value);