Support generic types by using their upper bound.