Defend against NPE when tags is null