On the products the labels sometimes say "Не содержит кофеин" Ref1 (accusative), and sometimes "Не содержит кофеина" Ref2 (genitive) (both meaning "No caffeine present"). Which one is correct? (On references see the images themselves).
If you make it a positive statement "Содержит кофеин" (accusative), then you will no longer be able to construct a genitive phrase that is correct but still uses the verb. However, if you say "Нет кофеина" or "Без кофеина", then it's always genitive, but that is clearly a different grammatical structure, so it is not possible to generalise from these.
P.S. You can use it with other nouns as well, I've selected caffeine just to talk about something concrete. It could just as well be "Не содержит сахар/сахара" ("No sugar present").