Better checking for matchMedia