Using type equality and performing conversions