[algorithms][is_valid] attempt to fix MSVC compilation errors

Attempt to fix MSVC compilation errors