Fix for bad content inside Resources element

In validate_template check if we have a dict before we try to
get 'Type'. We also need to check the response back from
validate_template to see if there are any 'Error'(s) and present
that back to the user.

Fixes LP# 1204157

Change-Id: I0f636a6a84f6afc9a0aff3089e2bd13a8f88a470
Merge "Fix for bad content inside Resources element"