Add Variant#as<type name> and use them inside readVariant