check for existance of key before returning