typed exceptions for if()