Are truncated stellar disks linked to the molecular gas density?