fix a runtime exception while compareColumns is null