Added null checks to only read the iconID of a dietary flag if the flag ...

Added null checks to only read the iconID of a dietary flag if the flag is not null