If a married person dies not domiciled in this state and leaves a valid will disposing of real property in this state which is not the community property of the decedent and the surviving spouse, the surviving spouse has the same right to elect to take a portion of or interest in such property against the will of the decedent as though the property were located in the decedent’s domicile at death.