Condition for directly testing scalar modes of gravitational waves by four detectors