I just write my own function, is_string for type checking and strlen to check the length.
function emptyStr($str) {
return is_string($str) && strlen($str) === 0;
}
print emptyStr('') ? "empty" : "not empty";
// empty
Here's a small test repl.it
EDIT: You can also use the trim function to test if the string is also blank.
is_string($str) && strlen(trim($str)) === 0;