def is_palindrome(word):
    """
    Checks if the given word is a palindrome or not. A palindrome is  string
    that reads the same if reversed like "madam" or "anna".

    Parameters
    ----------
    word: str
        The word to be checked if it's a palindrome or not.

    Returns
    -------
    bool:
        A boolean verifying if the given word is a palindrome. `True` indicates
        the given word is a palindrome. `False` indicates it's not.

    Raises
    ------
    AssertionError:
        If the given word isn't a `str` object.

    Example
    -------
    >>> is_palindrome("madam")
    True
    >>> is_palindrome("anna")
    True
    >>> is_palindrome("apple")
    False
    >>> is_palindrome("")
    True
    """
    assert type(word) == str

    for i in range(len(word) // 2):
        if word[i] != word[len(word) - 1 - i]:
            return False
    return True