ConstraintUtils static class ConstraintUtils Provides methods to support consistent checking in constraints. Documentation Code public static T RequireActual<T>(object actual, string paramName, bool allowNull = false) Requires that the provided object is actually of the type required.