Unit testing? I think that, from the computer's point of view, type II errors are correct, in that no errors are generated, no crashes, etc. It's a semantic problem, and so human-generated testing (and, of course, end users :-) are the only ways to discover it's wrong.
You would need a method detect them. The question is how to detect them.
One possible solution is to define all valid data by rules. That might be a laborious work. In this case a Fuzzer could check the returned error for valid or invalid input data.