Replace OpenGL handle with optional type.
Add the NDEBUG preprocessor macro for assertion.