Throw error if key doesn't exists for an identity in getPrivateKey