check keys is None exlicitly
Merge pull request #787 from dimagi/repkey

check keys is None exlicitly