The code changes are to generate metadata.yaml, config.yaml, unithooks from tosca template.

This if guard feels like it could mask a bigger problem .. if the requirement is not None, and not an instance of dict .. then someone has managed to get that information in to our script and we should probably error here so we can try to resolve that.