<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register(self, app, route, endpoint=None):
 # type: (Flask, str, str) -> None """Method to register the routing on the app at provided route. This is a utility method, that can be used for registering the ``dispatch_request`` on the provided :py:class:`flask.Flask` application at the provided URL ``route``. :param app: A :py:class:`flask.Flask` application instance :type app: flask.Flask :param route: The URL rule where the skill dispatch has to be registered :type route: str :param endpoint: The endpoint for the registered URL rule. This can be used to set multiple skill endpoints on same app. :type endpoint: str :rtype: None :raises: :py:class:`TypeError` if ``app`` or `route`` is not provided or is of an invalid type """

        if app is None or not isinstance(app, Flask):
            raise TypeError("Expected a valid Flask instance")

        if route is None or not isinstance(route, str):
            raise TypeError("Expected a valid URL rule string")

        app.add_url_rule(
            route, view_func=self.dispatch_request, methods=["POST"],
            endpoint=endpoint)