Velocity templates should be called for ascenedant primary types

Fix for: https://www.pivotaltracker.com/s/projects/684825/stories/79207804
mixinTypes can be null, check for that in order to avoid an NPE.