OS X: Fix crash when text control is empty

When reading the value of text control on OS X, empty text wasn't
properly checked for.