Guard is added to refTypeGetValue function.