avoir toute sa tête

Etymology
Literally, “to have all one's head.”

Verb

 * 1)  to have one's wits about one, to have all one's marbles, to be all there

Usage notes

 * Often used in the negative.
 * Not to be confused with.