refactor checking of pulls being real and open