If you'd allow me to mention, up until late 1989 the Patent Act had restrictions. There was restricted patenting of an invention that has an illicit object in view. At the time when we amended the Patent Act in 1989, the legislator decided to remove this requirement, which was, to the best of my knowledge, never used and never challenged in court.
Again, as my colleague was mentioning, the criteria for assessment that the patent office uses really focus on the technical and on the contributions of an invention, which are novelty, obviousness, and of course utility.