A universal basic income (UBI) has been embraced by certain politicians and pundits on both the left and the right.