MAINT: Refactor check_entry method to also look at np.inf

Also, make the method a module function.