Fixed instanceof check on http request
Added static utility class to make middleware more accessible