Add validation for an existence of a resource type

Validation of resource type existence was missing.
The patch adds validation checks that in the template the resource
type is set and is not an empty string.

Change-Id: I171644010ec868e8acc4c29556889256e8bf51b6
Closes-Bug: #1257243
Merge "Add validation for an existence of a resource type"