def strip(_str):
    """
    Convenient function to strip string. Accept C{None}.
    
    Examples:
    strip(None) = None
    strip("") = ""
    strip(" ") = ""
    strip(" abc") = "abc"
    strip("abc ") = "abc"
    strip("  ab  c   ") = "ab  c"
        
    strip(1)    # Raise AttributeError: 'int' object has no attribute 'strip'
    """
    if not _str:
        return _str
    return _str.strip()