Allowing configurable suffix-checking function.