Can I pump at 31 weeks?

I’ve started leaking and want to get the hang of pumping and I want to see the colostrum and whatnot.

Is it safe?