Check for correct exception