Check for the correct exception