Avoid using exceptions when not needed in BridgeTypedArray am: 84ef3fec24

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/layoutlib/+/12862616

Change-Id: Ia6c11e9e785d145a9d089a126d60f1c31275f440