pub fn assert_non_null<T>(ptr: *const T, what: &str)
Assert that a pointer is non-null and valid.
Used in debug builds to catch NULL pointer dereferences early.