Refactor public_view_url check to be more pythonic

In addition to this I also removed the is_public variable because the new utils
function says the same thing so it is redundant.