```ts
/**
 * Expresses a length held as a whole count of millimetres in workshop notation.
 * @param mm - The length in millimetres to be converted.
 * @returns A string representing the length in workshop notation.
 */
export function splitLength(mm: number): string {
  if (!Number.isInteger(mm) || mm < 0) {
    throw new Error("Invalid input");
  }

  const meters = Math.floor(mm / 1000);
  const centimeters = Math.floor((mm % 1000) / 10);
  const millimeters = mm % 10;

  let result: string[] = [];

  if (meters > 0) {
    result.push(`${meters}m`);
  }
  if (centimeters > 0) {
    result.push(`${centimeters}cm`);
  }
  if (millimeters > 0 || result.length === 0) {
    result.push(`${millimeters}mm`);
  }

  return result.join(" ");
}
```