Add helper function for check.