fixing faulty return statement

Using the existing line of code, the return statement would return true if the tagName is an input because the other two bools return true, making it all true. I amended the boolean to evaluate the line as a whole instead of individual parts.