Of course! The saliva sample is 0% invasive and does not pose any risk to your health or the baby's. It is totally safe and also the test result will not be affected by your baby's genetics.
To obtain the baby's DNA it is necessary to wait until the baby is born; the baby's DNA cannot be obtained with the mother's saliva.