```python
LADDER = (("m", 1000), ("cm", 10), ("mm", 1))

def split_length(mm: int) -> str:
    if not isinstance(mm, int) or mm < 0:
        raise ValueError("Length must be a whole number and non-negative.")
    
    mm = abs(mm)
    
    result = []
    
    for unit, value in LADDER:
        count = mm // value
        if count > 0:
            result.append(f"{count}{unit}")
            mm %= value
    
    if mm > 0:
        result.append(f"{mm}mm")
    
    return " ".join(result)
```