Starting in emacs 24.4, there are two different functions available for you to call, depending on what you mean by 'empty'.
(string-empty-p " ")
nil
(string-blank-p " ")
0
I'm having trouble finding docs to link to, but emacsredux.com has more information.
If you get the error Symbol's function definition is void.
, include (require 'subr-x)
in the initialization file (it's a package for trimming and string manipulation).