def _is_int(value):
    """ Check whether a value is an int or not.
    """
    try:
        if (str(value).isdigit() or
                (len(str(value)) > 1 and str(value)[0] == '-' and
                 str(value)[1:].isdigit()) or
                int(value) == value):
            return True

        return False
    except (TypeError, ValueError):
        return False