Use offsetExists when checking for header