I just paste the code from https://elixirforum.com/t/just-created-a-typeof-module/2583/5 :)
defmodule Util do
types = ~w[function nil integer binary bitstring list map float atom tuple pid port reference]
for type <- types do
def typeof(x) when unquote(:"is_#{type}")(x), do: unquote(type)
end
end