How to check if a server function has a certain middleware - TanStack