added code to check for null on example tag generation ln. 122