Added more type checks into the bundling route.