Switch empty() to ! test for PHP 5.4 compatibility.  Add test case. Fixes #3.