[FOLD] Replace contract checks with assert