middleware only calls next() if available