Fix t.NumFiled() panics for non-struct type

Recursively get t.Elem() if it's a pointer type.