Check for header first since it's faster