Check for exception type.