Can't pass `nothing` to macro

I am running julia 1.0 on Manjaro Linux. I have created a macro like this, which can generate a power function, with optionally a constant offset and/or a constant factor:

macro pow(functionname::Symbol, pow::Int, add::Union{Nothing,Number}=nothing, fact::Union{Nothing,Number}=nothing)
	expr = :(x ^ $pow)
	if !(fact === nothing)
		expr = :($fact * $expr)
	end
	if !(add === nothing)
		expr = :($expr + $add)
	end
	return quote
		$(esc(functionname))(x) = $expr
	end
end

This works pretty well and I can call it either like this: @pow f 2, this: @pow f 2 1 or like this: @pow f 2 1 .5, which does exactly what it should.
Now, I want the macro to generate a function without an offset but with a constant factor and I don’t want to just set the offset to 0, because it would still generate the extra code. I tried just calling it like this: @pow f 2 nothing .5, but it fails with this error:

ERROR: LoadError: MethodError: no method matching @pow(::LineNumberNode, ::Module, ::Symbol, ::Int64, ::Symbol, ::Float64)
Closest candidates are:
  @pow(::LineNumberNode, ::Module, ::Symbol, ::Int64, ::Union{Nothing, Number}, ::Union{Nothing, Number}) at /home/simeon/macro.jl:2
  @pow(::LineNumberNode, ::Module, ::Symbol, ::Int64) at /home/simeon/macro.jl:2
  @pow(::LineNumberNode, ::Module, ::Symbol, ::Int64, ::Union{Nothing, Number}) at /home/simeon/macro.jl:2
in expression starting at REPL[2]:1

, which seems to indicate that it interprets nothing as a Symbol and not a Nothing-Type.
Is this behavior actually intentional? If so, is there a way to tell Julia not to interpret nothing as a symbol but as a value? If also tried it like this: $nothing, nothing::Union{Nothing,Number} and even with a function that just returns nothing, all of which failed. Any help is appreciated.

Macros work on syntax, so yes, nothing is just a symbol.

You can, of course special, case the interpretation of that symbol in your macro.

Yes, I realize, that I can just introduce a special case, but there are definitely use cases where you’d want to have an extra nothing case. Is there no way to do this? It works fine with basic types like Integers or Strings, is there no way to pass nothing like this, too? Or would you have to make nothing part of the actual syntax to do this?

If you care about literal nothings, you can do

julia> macro foo(x)
       if x==:nothing
       return :1
       else
       return :($x)
       end
       end
julia> @foo 2+3
5

julia> @foo nothing
1

julia> @foo Nothing()

But as you see, this does not catch different spellings of nothing, which would need to be @generated.

This should also be performant if the type of x is known or inferred properly.

macro foo(x)
    esc(quote 
        if $x isa Nothing
	    return 1
        else
            return $x
        end
    end)
end