Fixing tags check for undefined.

The check for `tags` element is not checking for undefined correctly.  This causes a `tags.length` error when tags is not defined in the spec.