add is_reference handling to getType