should be changed to this since the proper syntax is "if ()" (You need extra brackets)
if (OrderItemType != T || (OrderItemType == D && NumberRequiredLevel != null) || (OrderItemType == D && NumberRequiredLevel != ""))