coverity#1260296 Unchecked dynamic_cast

Change-Id: Ib19609c3f4c83ae8baef83bcdadee79e69743df5
coverity#1260333 Unused value

Change-Id: I2c6faad05d7e1c92e554864abfb257907f803d51