Skip proxy when destination node is proxy or down

Skip to send proxy request when the destination node is proxy or its state is down because the request is not handled or arrived on the destination node.
You need to check the pointer returned from dynamic cast.