N-Nitroso-N-methylurea is used to prepare diazomethane. It is carcinogenic and often it is also self prepared. If a substitution of diazomethane is impossible then at least Diazald (N-Methyl-N-nitroso-4-toluenesulfonic acid amide) may be used as a substitute. 100 g Diazald are commercially available for 60 €. Even isotope labelled diazald is available. The aldrich company offers a lot of references how to use the diazald.