Whenever relief sought under this Code is based on allegations of domestic violence, as defined in the Illinois Domestic Violence Act of 1986, the court, before granting relief, shall determine whether any order of protection has previously been entered in the instant proceeding or any other proceeding in which any party, or a child of any party, or both, if relevant, has been designated as either a respondent or a protected person.