convert type of given value based on yaml tag
convert(String.t, String.t | nil) :: String.t | integer | float