check for vicinity before accessing it by key