Use a custom constraint instead of private assertion function

Might be more flexible