import re


def clean_whitespace(text):
    """Replace whitespace characters with a simple space.

    Parameters
    ----------
    text : str
        The text to clean

    Returns
    -------
    clean_text : str
        The text with whitespace replaced
    """
    if not isinstance(text, str):
        return None
    return re.sub(r"\s", " ", text.strip())