Julia, 1313 12 bytes
f(n)=n==0=n<1?1:n
Unfortunately, Julia doesn't do implicit casting from int to boolUnfortunately, Julia doesn't do implicit casting from int to bool, so I have to burn an entire 3 characters just to do a comparison to zero. Saved one byte by safely assuming the number isn't negative. Still too verbose for my taste, so I have to burn an entire 3 characters just to do a comparison to zerothough.