Assuming they were checked at the last inspection and are still operational... there are squat switches designed into the aircraft. Most are on the mains, Cessna retracts are on the nose.
If the strut is fully extended, the switch allows gear to come up. Light on wheels, gear can come up. Depends where the switch is and how it's been rigged./QUOTE]
This is what typically gets the Cessna RG folks when it happens. As the nose gets light and they start to rotate, the nose gear will start to retract well before flying speed and the prop hits.
Oh and there are a few that are also tied to airspeed too, but not many of them are that way.
Pipers and the Beech Duchess come to mind.
As had been said, sometimes the safeties don't work. We had a CFI back in San Diego that was checking a student out in the club Duchess. On the ground without even running the engines, she pulls the gear switch up to 'demonstrate' the safety. IAW Murphy's law, it failed and the nose gear folded up right there in the tiedowns. She refused to believe she did anything wrong. Idiot.