startTag may be null. So we need to check it before calling tags.push().