Added null check for portType and methods[methodname].output
Merge pull request #305 from gabhi/new_fix

Added null check for portType and methods[methodname].output