Let's move this check to it's own method since it's used in the view as well.