It is well known that the theory of types, first introduced by Bertrand Russell in 1903 and developed with Whitehead in their Principia Mathematica (1910), was a way to deal with paradoxes in set theory. Type theory was later developed by Church, Per Martin-Löf and many others.
In type theory, every mathematical object belongs to a type. One could link this with the fact that in physics every quantity has a unit. Knowing that units were introduced in physics certainly well before types found their way explicitly in logic, did units in physics play any role in the introduction of types in logic and the foundations of mathematics?