import re


def parse_budget(s):

    """
    Parse a `budget` string and convert it to numeric.

    Parameters
    ----------
    s : str or float
        String `budget` value

    Returns
    -------
    Float
        Numeric `budget` value
    """
    
    # Check if value is null or already a float 
    if isinstance(s, float):
        return s
    
    # Remove $, spaces, and commas
    s = re.sub(r'[\$\s,]', '', s).lower()
    
    # Convert to float
    if 'mil' in s:
        return float(s.replace('mil', '')) * 1e6 # million
    else:
        return float(s)