def _lines(text):
    """Split text into lines, stripping and returning just the nonempty ones.

    Returns None if the result would be empty."""

    lines = [x for x in map(lambda x: x.strip(), text.split('\n')) if len(x) > 0]
    if len(lines) == 0:
        return None
    return lines