Better error checking macros/fns.