"Is it a boy or a girl" is fine. This is one of the very rare circumstances in which it it perfectly fine to refer to another person as an "it". Savor it.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
X11Wouldn't it also be correct to ask; What is the gender? I know that it is somewhat off the topic, but to avoid the use of it as a referent to persons.. though you are absolutely right about the use whatsoeverI would only use "gender" in grammatical contexts. It has an air of euphemism elsewhere.
Regards Jay