isMiddleware decorator