def width(text, width):
    """
    Insert a new line character for each block of `width` characters into the
    input text.

    :param str text: the input text for newlining.
    :param int width: a positive integer for dividing input with new lines.
    :returns: the newlined text.
    """

    if not isinstance(width, int) or width < 1:
        return text

    if not isinstance(text, str):
        return None

    text_segments = [text[i:i+width] for i in range(0, len(text), width)]

    return '\n'.join(text_segments)