38 weeks dilated to a 4

Today I went in and they said my cervix is paper thin and I'm dilated to a 4.

Is it still safe to have sex?