def splitMetaArray (array, length=None):
    """
        Function that will convert a metadata array from its string
        representation to a valid Python list
        
        If the optional length argument is provided then the list must 
        be of this length otherwise None is returned 
    """
    array = array.strip("| ")
    valueList = array.split("|")
    if length != None and len(valueList) != length:
        return None
    result = []
    for value in valueList:
        result.append(value.strip())
    return result