add hook that allows changing the check to see if a page exists or not