To recognize ḍamīr al-faṣl, look for agreement with the preceding subject and the nature of the expression following it. The presence of a pronoun alone does not establish this analysis.
هُوَ عَالِمٌ
He is a scholar.
خَالِدٌ هُوَ الْعَالِمُ
Khālid is the scholar.
In the first sentence the pronoun starts the predication; in the second Khālid is already the topic. Where more than one grammatical parsing is possible, syntactic evidence and context settle the intended reading.