I believe you can use self.pageopen() here, which has a built in try and return false on failure.