def equalscontent(string1, string2):
    """Tests if two strings are equal.
    
    None is treated like an empty string. Trailing and leading whitespace is
    ignored."""
    if not string1:
        string1 = ""
    if not string2:
        string2 = ""
    return string1.strip() == string2.strip()