Check if the current header is a valid one.

Fixes #1. :smile: