Add another check for invalid arguments
Define NDEBUG in all projects
Add debug assertions at all api entry points