custom check function can raise exceptions