Allow only monomorphic types in the argument of Ref.