Handle type correctly