Advice? 😬

Im not so experience or all that inform but is like dry humping safe? Im not ready to actually have intercorse but i still wanna pleasure my boyfriend with a handjob. & im also trying to avoid pregnancy.