Throw an error if search/replace key doesn't exist.