def _safe_strip(value):
    """Strips the value if it is not None.

    :param value: text to be cleaned up
    :type  value: str or None

    :return: clean value if one was specified; None otherwise
    :rtype: str or None
    """
    if value is not None:
        return value.strip()
    return None
