           is_tuple(unquote(data)) and tuple_size(unquote(data)) > 0 and
             is_atom(elem(unquote(data), 0))
         end
+
       false ->
         quote do
           result = unquote(data)

    case remaining do
      [] ->
        {:{}, [], [tag | match]}
      _  ->
        keys = for {key, _} <- remaining, do: key
        raise ArgumentError, "record #{inspect tag} does not have the key: #{inspect hd(keys)}"
    end
  end


      tag = tag || name
      fields = Record.__fields__(:defrecord, kv)

      defmacro unquote(name)(args \\ []) do
        Record.__access__(unquote(tag), unquote(fields), args, __CALLER__)
      end

      defmacro unquote(name)(record, args) do
        Record.__access__(unquote(tag), unquote(fields), record, args, __CALLER__)
      end
    end
