Rely less on undocumented features

We simply guard against nil leaking into `merge` or `select-keys`. This does not change semantics.

I caught this with a linter I'm building.
Merge pull request #1406 from frenchy64/patch-1

Rely less on undocumented features