Is the center of a compact Lie algebra precisely the set of vectors on which the Killing form is zero? Suppose a Lie algebra $\frak{g}$ has a killing form, $B$, which is negative semidefinite.  Suppose $B(X,X)=0$ for some $X\in \frak{g}$.  Is $X$ necessarily in the center of $\frak{g}$?
 A: The assumptions in the question are weaker than the ones in the title, and it depends on which one you choose as to whether the resulting statement it true or not:
If we only assume $B$ negative semidefinite, the statement is not true: If ${\mathfrak g}$ is nilpotent, then its Killing form vanishes completely, but ${\mathfrak g}$ is not necessarily abelian.
If we assume that ${\mathfrak g}$ is a compact Lie algebra, then the statement is true: any compact Lie algebra is reductive, so it splits as ${\mathfrak g} = {\mathfrak z}({\mathfrak g})\oplus [{\mathfrak g},{\mathfrak g}]$ with ${\mathfrak g}^{\prime} := [{\mathfrak g},{\mathfrak g}]$ semisimple compact. The restriction of the Killing form of ${\mathfrak g}$ to ${\mathfrak g}^{\prime}$ is the Killing form of ${\mathfrak g}^{\prime}$, which is negative definite. Hence any $X\in{\mathfrak g}$ with $B(X,X)=0$ must belong to ${\mathfrak z}({\mathfrak g})$.
Edit This might be shortened a bit, recalling how one shows that compact Lie algebras have negative semidefinite Killing forms: If $G$ is a compact Lie group with Lie algebra ${\mathfrak g}$, averaging yields an $\text{Ad}(G)$-invariant scalar product $\langle -,-\rangle$ on ${\mathfrak g}$. Then $\rho=\text{Ad}: G\to\text{GL}({\mathfrak g})$ maps to $O({\mathfrak g},\langle -,-\rangle)$, so $\text{d}(\rho)=\text{ad}: {\mathfrak g}\to{\mathfrak g}{\mathfrak l}({\mathfrak g})$ has image in ${\mathfrak o}({\mathfrak g},\langle -,-\rangle)$, the $\langle-,-\rangle$-skewsymmetric operators on ${\mathfrak g}$. Those have purely imaginary spectrum, so $\text{tr}(\text{ad}(X)^2)\leq 0$ for all $X\in{\mathfrak g}$, with equality if and only if $\text{ad}(X)\equiv 0$, i.e. $X\in{\mathfrak z}({\mathfrak g})$. 
