if we get an nil object as input we convert it to '' and don't fail on gsub