Improved test for empty composition as suggested by Scopatz