action: add a common CheckBooleanFlag function