def get_type(type_name):
    """Return the type of the given node type string (without *? modifier)."""
    if type_name[-1] == '*' or type_name[-1] == '?':
        return type_name[:-1]
    return type_name
