Fixing possible NPE. https://wso2.org/jira/browse/ESBJAVA-3144
Merge pull request #43 from lasanthafdo/master

Fixing possible NPE. https://wso2.org/jira/browse/ESBJAVA-3144