check type

now this on the other hand, would have saved me quite a bit of time