Add unittests for type module