[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.
According to the scan result, ```GetStoragePartition()``` is virtual function, so ```rph``` should be checked. ```GetPath()``` is virtual function too, so I add the check for ```partition```. thanks.