is it possible to tell from a macro what mana you have left?

If it is, I would like to be able to do something like this:

if MANA < 5
/cast shoot
else
dps the shit out of something
end if


also what does the NULL do at the end of some macros?