added sanity check for tag arguments