fix possible npe

Change-Id: I722e485019ee25a47bc4ef72110600d6be0bd056