check unexpected presence of foreign keys before creating it