def to_float(s_val):
  """
    Converts s to a float if possible.
    @ In, s_val, any, value to convert
    @ Out, s_val, float or any
  """
  try:
    return float(s_val)
  except ValueError:
    return s_val