fix: Add missing _.isEmpty method for internal helper