Update logic to allow for nil tags