Whilst that is worth bearing in mind, it is also true that vitamin D reduces skin cancer risk, and office workers have 4x the skin cancer than outdoor workers.
Of course getting uvb from sun vs a lamp is very different. I myself do use one periodically.