Tweaks to ImageGen and some null checks on 2 string methods