ConstraintUtils static class ConstraintUtils Provides methods to support consistent checking for constaints methods. 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.