Add type-checking for raise statements