func doubleIfExists(fromKey key: String) throws -> Double? {
    switch fields[key] {
    case let .double(value):
      return value