Verify class casting for jobject constructor