When a resident of the state dies, testate or intestate, the surviving spouse shall be allowed, for the benefit of such spouse and the decedent's minor children during the period of their minority, from the personal or real property of which the decedent was possessed or to which the decedent was entitled at the time of death, the following:
The property shall not be liable for the payment of any of decedent's debts or other demands against the decedent's estate, except liens thereon existing at the time of the decedent's death. If there are no minor children, the property shall belong to the spouse; if there are minor children and no spouse, it shall belong to the minor children. The selection shall be made by the spouse, if living, otherwise by the guardian of the minor children. In case any of the decedent's minor children are not living with the surviving spouse, the court may make such division as the court deems equitable.
K.S.A. 59-403