@Override
    public CompiledQueryProfile convertFrom(Object object, ConversionContext context) {
        String profileId = object.toString();
        if (profileId.startsWith("ref:"))
            profileId = profileId.substring("ref:".length());
        CompiledQueryProfile profile = context.registry().getComponent(profileId);
        if (profile == null) return null;
        if (type != null && ! type.equals(profile.getType())) return null;
        return profile;
    }
Returns the query profile type of this, or null if any type works
container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileFieldType.java