insert_func.length was being determined as str rather than func