The sex of the baby in the womb

Question:

I was asked this question by a non Muslim and I was not able to answer him, please help!
'It is written in sura 31, verse 34 that only God knows what is in the womb, but today we too are able to know the sex of the baby in the womb before birth.'
He told me, this Quran claim is false!

Reply:

Indeed, today we are able to know the sex of the baby in the womb with ultrasound. However, to understand the correct meaning of 31:34, we must focus on the exact words in the verse:

With God is the knowledge of the Hour. He brings down the rain and He knows what is in the wombs. No self knows what it will earn tomorrow and no self knows in which land it will die. God is Knowledgeable, All-Aware.
31:34

We note that God did not merely say (God knows the sex of the baby in the womb), but God said:
"He knows what is in the wombs."
This phrase carries a much broader meaning than mere knowledge of the sex of the baby.

God knows everything about the baby in the womb, such as: who will this baby grow up to be, what his profession will be, who will he marry, how many children he will have, what illnesses he will have, how many years he will live and everything else about this baby in the womb.

To narrow the meaning of the words in 31:34 to the mere knowledge of the gender of the baby in the womb, then claim that the Quranic words are false, is quite deceptive and naive to say the least.