Use map instead of list comprehension in getitem
refactor import (like #2) and get_value to use ReferenceType test