fix possible npe

Change-Id: I0d8ec52da58159d9e8f8cf633cb1712e60c6cf2a