Is this ok?

Im not ready for actual penetration or even rubbing genetials. However i do dry hump with my boyfriend and with a hj he is able to ejaculate. He doesn't do it near me although & if it does maybe a small amount may fall in my pants. Is this still like a safe practice to avoid pregnancy?