Refactor checks into one method