change assert to explicit check