The mass function of the stellar component of galaxies in the Sloan Digital Sky Survey