Check for valid state when parsing constants.