coverity#704807 Dereference after null check

Change-Id: Ifbfdbc016cde790a2027a0036294b3be9e37a85c
coverity#1202788 Unchecked dynamic_cast

Change-Id: Ia768f7ebedfbf8650159db9eb86e107994c22374
coverity#1202787 Unchecked dynamic_cast

Change-Id: I16d9ae0f87157eaac2653ae76e5522a888b88f2b
coverity#706314 Uncaught exception

Change-Id: Ib723848550c910f94db2b1c5bc16e5f886e03bed
coverity#1202903 Uncaught exception

Change-Id: I2872cf32d9cd3d28a70d02365e2169da5f79ad7b