check keys exist