No, in general, you cannot specify an โexception listโ. However, to prevent the validity of Nullable types, you can use the "where T: class" constraint. Because Nullable is a structure that will have the desired effect.
Edit: Oh, it looks like I was too hasty - you asked how to forbid to allow anything that could be empty or, in particular, Nullable?
source share