Check key store result with isOk() instead of casted value
am: d166a88fb9

Change-Id: If2144150ef176c285536e100d32d65e693f184d1