handle null key, addresses #22