May be the issue with your code is that you are redirecting to "/Dashboard/Error" using HttpContext.Response.Redirect(). Since you are calling this method from a different class, it does not have access to the URL of your current request, which is why the redirection does not work.
Instead of using HttpContext.Response.Redirect(), you can return a RedirectToActionResult from your IdCheckHelper method.
example:
if (Id <= 0)
{
controller.TempData["Errors"] = "Invalid data";
return new RedirectToActionResult("Error", "Dashboard", null);
}
return null;