Checks SQL queries to make sure joins are done on foreign keys and not typoed.