Add support for actions using ToAction