handle google appengine reference keys