I do something similar. Here's a snippet of what I do (in debug-only):
Maybe this thread will help you choose to call just one or the other: "SetArgAddress can be used for both references and handles. For handles it will not automatically increment the object reference. SetArgObject can be used for handles, references to objects, and objects sent by value. For handles it will automatically increment the reference, and for objects sent by value it will make a copy of the object. Usually you'll want to use SetArgAddress for references, and SetArgObject for handles and objects sent by value."
I did see that quote, but I do want the behaviors of SetArgObject to be used if at all possible. I will give your solution a try. I inspected the code to get a variable's type ID, and I don't like how much code is executed just to get a value that is already cached in the asCScriptFunction object, which is why I was hoping there was another way, but this seems like it would work out fine Thank you.