default Optional<String> on(Object model) {
        final Object m;
        
        if (model instanceof Optional) {
            final Optional<?> result = (Optional<?>) model;
            if (result.isPresent()) {
                m = result.get();
            } else {
                return Optional.empty();
            }
        } else {
            m = model;
        }
        return metaOn(m).map(Meta::getResult).findAny();
    }
Locates the {@link Transform} that corresponds to the specified model
and uses it to generate a <code>String</code>. If no view is associated 
with the model type, an empty <code>Optional</code> will be returned.

@param model  the model
@return       the generated text if any
common-parent/codegen/src/main/java/com/speedment/common/codegen/Generator.java