def is_self(user, other):
    """
    Check whether `user` is performing an action on themselves

    :param user User: The user to check
    :param other User: The other user to check
    """
    if other is None:
        return True

    return user == other