Avoid $newid IDEA "possibly undefined" error in insertOn()