Handle type conversion in a saner way.