Create function pageIs / correct condition