Put ctypes under if condition