Regulation of nicotinamide metabolism