add test suite, bugfix for conversion of NULL pointers from ctypes