Fixing tags check for undefined.