This subchapter does not apply to any person in this Commonwealth confined as insane or mentally ill or as a defective delinquent or under sentence of death.