Only attempt replacement when we have replacements

We weren't checking if we were even provided replacements before using
them. This just adds a guard so we don't end up with a badmatch error on
the `lists:keytake/3`.

BugzId: 26124
Merge pull request #136 from cloudant/26124-check-replacements-exist

Only attempt replacement when we have replacements