BUG-6501: avoid NPE if sgm isn't defined