Yes, these are fine to have.
When thinking about our health, it's important to take a holistic approach and view the 'bigger picture'.
While we recommend avoiding artificial sweeteners (such as those found in sugar-free nicotine lozenges and chewing gum) because they can increase our cravings for sweet foods, it will be much more beneficial to your long term health to quit smoking. If the lozenges and chewing gum are effective tools that help to reduce your cravings for a cigarette, then it will be better to have these to help you quit smoking, rather than not having these and avoiding artificial sweeteners.
Over time, you may find you're less reliant on the chewing gum and lozenges to reduce cigarette cravings, which is when you can start to consider reducing your intake.