Comparison of optical nonlinearities of type II and type I quantum wells