check if page is valid