def c_to_f(val):
    """
    Converts Celsius to Fahrenheit; accepts numeric or string
    """
    try:
        return float(val) * 9. / 5. + 32.
    except (TypeError, ValueError):
        return val * 9. / 5. + 32.