def convert_to_int(value):
if not value:<EOL><INDENT>return None<EOL><DEDENT>if isinstance(value, str):<EOL><INDENT>value = value.strip('<STR_LIT>')<EOL><DEDENT>try:<EOL><INDENT>return int(value)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>return None<EOL><DEDENT>
Attempts to convert a specified value to an integer

    :param value: Content to be converted into an integer
    :type value: string or int