Use if for mask nodes to do the generic source image + mask image operation with the 4 available mask modes.