def _force_int(a_string):
    """Return the string as an int. If it can't be made into an int, return 0."""
    try:
        an_int = int(a_string)
    except (ValueError, TypeError):
        an_int = 0

    return an_int