It is unlikely you could catch a STI from a hand job, in a real world sense impossible. Even if you were to mutually masturbate each other you would be extremely unlikely to catch an STI, it is by far the lowest risk activity you can participate in with a SP. An essential component of an STI is sex....otherwise they would be like any other infection!