I have a class with a constructor having a parameter with a default value. With Ninject 2.2, it would honor the [Optional] attribute and work fine with no b
[Optional]
You can avoid setting AllowNullInjection globally while still injecting a parameter only when a binding exists by configuring your binding like this:
AllowNullInjection
Kernel.Bind() .To() .WithConstructorArgument(typeof(IValidator), c => c.Kernel.TryGet>());
[Optional] is not needed for that.