Custom check method

I wanted to create custom check method, on every request my csrfToken & csrfParam will be changing, My Scenario contains navigating to multiple pages which leads to too many check statements for saving these params. Is there any way to create custom method and call that every time, just like how its done for headers in the below case. Its mandatory to get these parameters to proceed further at any step in my scenario.

http("Accounting System Simple List") .post("/router/MasterDataUI/simple-list.htm") .formParam("fillerKey",encodeData("fillerValue")) .formParam("entityId",encodeData("AccountingSystemEntity")) .headers(getSimpleListHeaders()) .check(css("#csrfToken","value").saveAs("moduleCsrfToken")) .check(css("#csrfParam","value").saveAs("moduleCsrfParam"))