Middleware should throw exceptions again instead of returning null

so that the next middleware can catch and handle the exception.