The beauty of the flexibility of the word "lack" means we can use it with or without the word "a". Since it often refers to an intangible (perhaps uncountable) concept such as "lack of sleep" - where "lack" is defined by one's perspective of what constitutes "a lack" - we can leave the article out.
This leads us to it being a flexible word.
She has been suffering from a lack of sympathy.
Her problem is (a) lack of sleep.
These options are fine. It is preferred to put "a" before, to produce a countable noun which seems more correct (so your sentences sound better with "a").
Compare "lack" to "shortage". "Shortage" can only refer to concrete nouns (or things). Since this word is less flexible, we are obliged to use "a".
A shortage of water means country-dwellers are...
A shortage of much-needed penicillin has meant that...