Custom error message when a type fails to check?

Let’s say I am writing a custom type using lib.types.mkOptionType.

Is there any way to customize the error message when the type check fails to check?
This would be nice for UX purposes.

Thanks!