check if product code is master or a sub product code