use Moose::Util::TypeConstraints qw[ find_type_constraint ]; # ... find_type_constraint('MyType')->check( $my_value );