Maybe I should be doing this check (and the below object typecheck) on the JS side, anyway? And let the C++ assume it's getting a single object.