There's got to be a means of electrical magic to detect an analog set on the line, as the telcos used to do it on CO switches overnight to find opens (and even count phones on the line to catch unauthorized extension telephones back in the leased instrument days) but I've yet to see a PBX implement this as a feature.
Closest I've seen is on the Definity when a set is configured as having a neon MWI. During daily testing if the switch can't see a neon on the station ports assigned to have one, an alarm will be asserted.