do you mean that delete pendingsRequests[uid] doesn't fail if it is undefined?