Use generic types instead of raw ones when possible.