Refactor custom classifier check a little bit.