@classmethod
def int_safe(cls, s):
    """
        Only allow safe str and valid int to be coerced to destination IntType
        """
    if isinstance(s, bool):
        raise TypeError(f'{s} is not a integer')
    if isinstance(s, int):
        cls.check_value(s)
        return s
    if not isinstance(s, str):
        raise TypeError(f'{s} is not instance of <str>.')
    if len(s) < 1:
        raise TypeError(f"'{s}' is empty.")
    len_min = len(str(cls.min_value))
    len_max = len(str(cls.max_value))
    if len(s) > max(len_min, len_max):
        raise TypeError(
            f'Length of {s} is larger than max:{max(len_min, len_max)}.')
    ret = int(s)
    cls.check_value(ret)
    return ret
