check if link header exists and if last exists