Type checking can help you avoid passing the wrong type of thing to a function. But it can't help you if you provide the wrong type when you instantiate a generic function. You'll just get really confused about why it's not compiling with your param, which seems to be the right type.
The thing to check for that is, unfortunately, the human programmer.