Convert elements of JS arrays into the right type of NSObject.

Guess the appropriate subclass of NSObject based on the type of the JavaScript object.