def METHOD_NAME(cls, unit: str | None, values) -> str:
    """Check that integer-type parameters have a unit."""
    if unit is None:
        msg = f"Parameter {values['name']} has no unit"
        raise ValueError(msg)
    return unit