By examining the filament. It's never a 100% for sure test, but it usually works decently. They do the same things for headlights in cars for auto-accidents.
If a filament is hot (on) at the time of impact, it can bend in the direction of impact. If it is cold (off), it can break or shatter...