Consolidate functions used for checks and scripted constants