public static IPropertyRuleBuilder<T, TProperty> IsNullOrWhiteSpace<T, TProperty>( this IPropertyRuleBuilder<T, TProperty> ruleBuilder) where T : class { return ruleBuilder.IsTrue(property => string.IsNullOrWhiteSpace(property?.ToString())); }