Is prayer nullified by having thoughts while performing it?
Prayer isn`t nullified by having thoughts while performing it, provided that the praying person offers all of its pillars and meets all of its conditions. However, the reward decreases significantly in the absence of reverence since a praying person is rewarded according to the attentiveness of his/her heart during prayer.
Is wearing a cap permissible for boys, or girls?
All Perfect Praise is due to Allah, The Lord of The Worlds.
In principle, anything is permissible sol long as there is no Sharia evidence prohibiting it, thus wearing the cap by boys is permissible as long as it isn`t done in imitation of the disbelievers. Moreover, a Muslim woman should avoid all that which attracts the attention of men because whatever leads to the forbidden is forbidden. And Allah Knows Best.
Is it a condition that a woman should untie her locks while making Ghusl (ritual bath)?
Ghusl from Janabah (ritual impurity), or menstruation obligates that water reaches the roots of the hair in order for the Ghusl to be valid, but if it doesn`t, then hair locks must be untied for water to reach them, and for Ghusl to become valid.
What is the ruling of Sharia on marrying the maternal niece of one`s wife?
All perfect praise be to Allah the Lord of The Worlds. May His blessings and peace be upon our Prophet Mohammad and upon all his family and companions.
One may not combine in marriage a woman and her paternal aunt, or a woman and her maternal aunt, as stated the Prophet (PBUH). And Allah The Almighty Knows Best.