Testing the isotropy of the Universe with type Ia supernovae in a model-independent way