Adding a null check
Merge branch 'rc4' of https://github.com/WSO2Mobile/mdm into rc4