simplifying check for empty header