[verifier] Verify if the catch type is valid under the method context. Fixes BXC #12898.
Add regression test for #12898.