The Hubble diagram of type Ia supernovae as a function of host galaxy morphology