Is there an equivalent for toFunction which should also be registered ?