Safer type conversion.