36 weeks and having sex?

Virginia
So I am 36 weeks and when my Dr was checking me for dilatation today she said I was not dilated but she could feel his head thru my cervix. I didn't even think to ask this while I was there, but do you think it's no longer safe to have sex?