I have an interface similar to the one below:

```
public interface IInterface<T>
    where T : IInterface<T>
{
}

```

And now I need to create a type representing this interface using reflection, e.g.

```
typeof(IInterface<>).MakeGenericType(someType);

```

However, I don't actually know what type 'someType' will be until runtime, and it's possible that the type won't be valid as a type argument for the generic interface, so MakeGenericType fails.

The question is, how can I check that 'someType' is valid for the generic constraint?