Exercise 1: Write a function in the M language that takes a national ID as input and checks if it is valid or not. If the ID has fewer than 10 digits, it should insert leading zeros as necessary.