[helpers] Additional nil check in tag helpers