The effect of background galaxy contamination on the absolute magnitude and light curve speed class of type Ia supernovae