If the verb in a sentence is a linking verb instead of an action verb, then it cannot take a direct object.
Definition: A subject complement is the word after the linking verb that renames or describes the subject. It completes (not gives a compliment to) the verb.
Hayley is a nice girl. (girl renames Hayley)
Hayley is nice. (nice describes Hayley)
Subject complements can be nouns, pronouns, or adjectives. They are called predicate nouns, predicate pronouns (both can also be called predicate nominatives), and predicate adjectives.
Keith is our class president. (predicate noun)
The new substitute is he. (predicate pronoun)
All our students are responsible. (predicate adjective)