Ensure empty/null headers are correctly handled