More flexible type conversion.