more relaxed condition for types matching in assertions