Prevent NPE in AbstractBeanContainer.getType() method (#15173).

Change-Id: Ieaed329ed85c68d0da8bd169b4cc5c5886dde212