Fixing conditional logic. The manifest object does not have an 'empty' method