def validate_price(price):
    """ validation checks for price argument """
    if isinstance(price, str):
        try:
            price = int(price)
        except ValueError:
            price = float(price)
    if not isinstance(price, (int, float)):
        raise TypeError('Price should be a number: ' + repr(price))
    return price
