mixing wire sizes on a single circuit
Breakers are there to protect the wiring in the wall.  You can mix wire sizes, but the breaker has to match the smallest wire you used.  So if there is any 14g wire on the circuit anywhere, it must have a 15A breaker.

The electrician that mentioned the fire hazard probably assumed the circuit was covered by a 20A breaker because of the 12g wire so that would be bad since there was also 14g in the wall.

When a house is first wired, mixing wire size generally doesn't happen.  So, whenever you see mixed wire, you should assume it's a problem until you check the breakers and make sure it's ok.