Merging duplicated code in get()/get_multi().