Fixing a bug with how I was throwing a validation error message

My method for getting the tagName as flawed