[Application] Add the check for the return value.

This patch is to add the check for the return value of FromID() and
GetStoragePartition().

Related to XWALK-2928.
Merge pull request #2754 from wuhengzhi/xwalk_2928_cid237595

[Application] Add the check for the return value.