Shiro: fixed potential NPE.