A mold assembly includes a product cavity for producing an insert-molded product and a projection-forming cavity for, if an insert of the product is irregularly deformed or disposed in wrong orientation, forming a projection on the insert-molded product. The projection, if present on the product, blocks most of the light emitted from a light-emitting element. A photodetector detects the intensity of the received light and when the detected light intensity is less than a predetermined value due to the presence of the projection, the product is judged to be rejected. Visual inspection or optical sensors judge the product to be rejected if the product has a through-hole closed and to be acceptable if the through-hole of the product is open. This judgment does not require an X-ray inspection device or radiologists.