You can try like this.
foreach (var user in dataContext.Users
.Where(u => roles.Contains(u.RoleID.Value)
&& (u.isValid ?? false))) // note the bracket around (u.isValid ?? false)
Or
foreach (var user in dataContext.Users
.Where(u => roles.Contains(u.RoleID.Value)
&& (u.isValid.HasValue && u.isValid))) //you can use HasValue to check for null