[typetraits] Implement isValid function to generate class member introspection functors
- isValid can be used to generate a functor that can check whether an operation done with a type is valid
- this patch also provides examples in form of a test and documentation