public NiceCommand(Action <T> execute, Func <T, bool> canExecute)
     : base((Action <object>)(o =>
 {
     if (!NiceCommand <T> .IsValidParameter(o))
     {
         return;
     }
     execute((T)o);
 }), (Func <object, bool>)(o =>
 {
     if (NiceCommand <T> .IsValidParameter(o))
     {
         return(canExecute((T)o));
     }
     return(false);
 }))
 {
     if (execute == null)
     {
         throw new ArgumentNullException(nameof(execute));
     }
     if (canExecute == null)
     {
         throw new ArgumentNullException(nameof(canExecute));
     }
 }
 public NiceCommand(Action <T> execute)
     : base((Action <object>)(o =>
 {
     if (!NiceCommand <T> .IsValidParameter(o))
     {
         return;
     }
     execute((T)o);
 }))
 {
     if (execute == null)
     {
         throw new ArgumentNullException(nameof(execute));
     }
 }