Check before trying to use the History API