A condition for the existence of quasi-periodic nonlinear internal waves in the ocean shelf zone