def parseNamespacePrefixAndTypeString(typeString):
    """Parse type string and return namespace key and type."""

    # split on ':' if ':' is there
    if typeString is None:
        nsprefix = '*'
        val = '*'
    elif ':' in typeString:
        (nsprefix, val) = typeString.split(':', 1)
    else:
        nsprefix = None
        val = typeString
    return (nsprefix, val)