Added Variant type support to minimize autobox allocations.