def METHOD_NAME(self, number):
    """Validate the given 1-based page number."""
    try:
        if isinstance(number, float) and not number.is_integer():
            raise ValueError
        number = int(number)
    except (TypeError, ValueError):
        raise PageNotAnInteger(_("That page number is not an integer"))
    if number < 1:
        raise EmptyPage(_("That page number is less than 1"))
    return number