check if the history is non-empty