Fixing a bug that made everything crash always.
Adding type-checking macro. Kinda ugly, kinda awesome.