Fixed transformer and added test
Prevented possible fatal when transport is not set on resource

This is the case for a StringResource