Find why this helper accepts values outside its integer-cents contract.
Python
def record_cents(record: dict[str, object]) -> int:
cents = record.get("cents") or 0
if not isinstance(cents, int):
raise ValueError("cents must be an integer")
return cents