I believe that assert() is disabled if NDEBUG is defined so this check is not entirely redundant.