Handle empty elements in keymaps