make routeObj function checks consistent and non-erroring