[Refactor] - Move the inner join checking to the header