checking for null state (happens when initializing new state for new categorical data) to avoid NPE (ticket 3184)
checking for null state (happens when initializing new state for new categorical data) to avoid NPE (ticket 3184)