Type Conversion using a Generic Method