GetTarget only throws if source or property are null, however the error message you're getting isn't from GetTarget throwing, it is xpconnect throwing because source or property are not null or JS objects that it can pretend are nsIRDFResources.
GetTarget only throws if source or property are null, however the error message you're getting isn't from GetTarget throwing, it is xpconnect throwing because source or property are not null or JS objects that it can pretend are nsIRDFResources.