unit spec for query mapper examples
convert nil to "", e.g. an empty key, prevents error with `dup`
Merge pull request #352 from JonRowe/fixup_query_mapper

Fix issue where empty query key causes a `TypeError`