def endswith_whitespace(text):
    """ Check if text ends with a whitespace

    If text is not a string return False
    """
    if not isinstance(text, str):
        return False
    return text[-1:].isspace()
